Update icon badges to match spec

- Size defined as percentage of app icon size
- Width changes when there are 2 or 3 digits (round rect)
- Offset slightly away from the app icon
  - Had to move drawing to BubbleTextView instead of
    FastBitmapDrawable
- Hide badge when dragging and while popup is open
- Tweaks for some color/text parameters

Bug: 35744066
Change-Id: Ibb15ca634abaa0729aea637c904c4c6889a58c7c
This commit is contained in:
Tony Wickham
2017-02-24 08:59:36 -08:00
parent 343a77e609
commit 1237df0a7c
10 changed files with 177 additions and 102 deletions

View File

@@ -197,8 +197,6 @@ public class DeviceProfile {
hotseatBarBottomPaddingPx = 0;
hotseatLandGutterPx = res.getDimensionPixelSize(R.dimen.dynamic_grid_hotseat_gutter_width);
mBadgeRenderer = new BadgeRenderer(context);
// Determine sizes.
widthPx = width;
heightPx = height;
@@ -213,6 +211,9 @@ public class DeviceProfile {
// Calculate the remaining vars
updateAvailableDimensions(dm, res);
computeAllAppsButtonSize(context);
// This is done last, after iconSizePx is calculated above.
mBadgeRenderer = new BadgeRenderer(context, iconSizePx);
}
DeviceProfile getMultiWindowProfile(Context context, Point mwSize) {