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
diff --git a/src/com/android/launcher3/DeviceProfile.java b/src/com/android/launcher3/DeviceProfile.java
index 43f7d23..e47031a 100644
--- a/src/com/android/launcher3/DeviceProfile.java
+++ b/src/com/android/launcher3/DeviceProfile.java
@@ -197,8 +197,6 @@
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 @@
// 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) {