Skip to content
This repository has been archived by the owner on Sep 6, 2019. It is now read-only.

Commit

Permalink
Make filter count size depend on icon size
Browse files Browse the repository at this point in the history
  • Loading branch information
M66B committed Feb 5, 2014
1 parent 4c3db5b commit 9f5541c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/biz/bokhorst/xprivacy/ActivityMain.java
Original file line number Diff line number Diff line change
Expand Up @@ -423,12 +423,12 @@ public boolean onPrepareOptionsMenu(Menu menu) {
Paint paint = new Paint();
paint.setStyle(Style.FILL);
paint.setColor(Color.WHITE);
paint.setTextSize(30);
paint.setTextSize(bitmap.getWidth() / 3);

String text = Integer.toString(numberOfFilters);

Canvas canvas = new Canvas(bitmap);
canvas.drawText(text, bitmap.getWidth() - paint.measureText(text), 30, paint);
canvas.drawText(text, bitmap.getWidth() - paint.measureText(text), bitmap.getWidth() / 3, paint);

MenuItem fMenu = menu.findItem(R.id.menu_filter);
fMenu.setIcon(new BitmapDrawable(getResources(), bitmap));
Expand Down

0 comments on commit 9f5541c

Please sign in to comment.