Loading res/values/attrs.xml +1 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ <attr name="workspaceKeyShadowColor" format="color" /> <attr name="workspaceStatusBarScrim" format="reference" /> <attr name="widgetsTheme" format="reference" /> <attr name="folderBadgeColor" format="color" /> <!-- BubbleTextView specific attributes. --> <declare-styleable name="BubbleTextView"> Loading res/values/styles.xml +2 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ <item name="workspaceKeyShadowColor">#44000000</item> <item name="workspaceStatusBarScrim">@drawable/workspace_bg</item> <item name="widgetsTheme">@style/WidgetContainerTheme</item> <item name="folderBadgeColor">?android:attr/colorPrimary</item> </style> <style name="LauncherTheme" parent="@style/BaseLauncherThemeWithCustomAttrs"></style> Loading Loading @@ -70,6 +71,7 @@ <item name="popupColorSecondary">#424242</item> <!-- Gray 800 --> <item name="popupColorTertiary">#757575</item> <!-- Gray 600 --> <item name="widgetsTheme">@style/WidgetContainerTheme.Dark</item> <item name="folderBadgeColor">#FF464646</item> <item name="isMainColorDark">true</item> </style> Loading src/com/android/launcher3/BubbleTextView.java +8 −4 Original line number Diff line number Diff line Loading @@ -386,10 +386,14 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver, } public void getIconBounds(Rect outBounds) { int top = getPaddingTop(); int left = (getWidth() - mIconSize) / 2; int right = left + mIconSize; int bottom = top + mIconSize; getIconBounds(this, outBounds, mIconSize); } public static void getIconBounds(View iconView, Rect outBounds, int iconSize) { int top = iconView.getPaddingTop(); int left = (iconView.getWidth() - iconSize) / 2; int right = left + iconSize; int bottom = top + iconSize; outBounds.set(left, top, right, bottom); } Loading src/com/android/launcher3/badge/BadgeRenderer.java +1 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,7 @@ public class BadgeRenderer { int size = (int) (DOT_SCALE * mDotCenterOffset); ShadowGenerator.Builder builder = new ShadowGenerator.Builder(Color.TRANSPARENT); builder.ambientShadowAlpha = 88; mBackgroundWithShadow = builder.setupBlurForSize(size).createPill(size, size); mCircleRadius = builder.radius; Loading src/com/android/launcher3/folder/FolderIcon.java +1 −5 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ import android.content.Context; import android.graphics.Canvas; import android.graphics.Point; import android.graphics.Rect; import android.graphics.Region; import android.graphics.drawable.Drawable; import android.os.Parcelable; import android.support.annotation.NonNull; Loading Loading @@ -483,10 +482,7 @@ public class FolderIcon extends FrameLayout implements FolderListener { public void drawBadge(Canvas canvas) { if ((mBadgeInfo != null && mBadgeInfo.hasBadge()) || mBadgeScale > 0) { int offsetX = mBackground.getOffsetX(); int offsetY = mBackground.getOffsetY(); int previewSize = (int) (mBackground.previewSize * mBackground.mScale); mTempBounds.set(offsetX, offsetY, offsetX + previewSize, offsetY + previewSize); BubbleTextView.getIconBounds(this, mTempBounds, mLauncher.getDeviceProfile().iconSizePx); // If we are animating to the accepting state, animate the badge out. float badgeScale = Math.max(0, mBadgeScale - mBackground.getScaleProgress()); Loading Loading
res/values/attrs.xml +1 −0 Original line number Diff line number Diff line Loading @@ -33,6 +33,7 @@ <attr name="workspaceKeyShadowColor" format="color" /> <attr name="workspaceStatusBarScrim" format="reference" /> <attr name="widgetsTheme" format="reference" /> <attr name="folderBadgeColor" format="color" /> <!-- BubbleTextView specific attributes. --> <declare-styleable name="BubbleTextView"> Loading
res/values/styles.xml +2 −0 Original line number Diff line number Diff line Loading @@ -42,6 +42,7 @@ <item name="workspaceKeyShadowColor">#44000000</item> <item name="workspaceStatusBarScrim">@drawable/workspace_bg</item> <item name="widgetsTheme">@style/WidgetContainerTheme</item> <item name="folderBadgeColor">?android:attr/colorPrimary</item> </style> <style name="LauncherTheme" parent="@style/BaseLauncherThemeWithCustomAttrs"></style> Loading Loading @@ -70,6 +71,7 @@ <item name="popupColorSecondary">#424242</item> <!-- Gray 800 --> <item name="popupColorTertiary">#757575</item> <!-- Gray 600 --> <item name="widgetsTheme">@style/WidgetContainerTheme.Dark</item> <item name="folderBadgeColor">#FF464646</item> <item name="isMainColorDark">true</item> </style> Loading
src/com/android/launcher3/BubbleTextView.java +8 −4 Original line number Diff line number Diff line Loading @@ -386,10 +386,14 @@ public class BubbleTextView extends TextView implements ItemInfoUpdateReceiver, } public void getIconBounds(Rect outBounds) { int top = getPaddingTop(); int left = (getWidth() - mIconSize) / 2; int right = left + mIconSize; int bottom = top + mIconSize; getIconBounds(this, outBounds, mIconSize); } public static void getIconBounds(View iconView, Rect outBounds, int iconSize) { int top = iconView.getPaddingTop(); int left = (iconView.getWidth() - iconSize) / 2; int right = left + iconSize; int bottom = top + iconSize; outBounds.set(left, top, right, bottom); } Loading
src/com/android/launcher3/badge/BadgeRenderer.java +1 −0 Original line number Diff line number Diff line Loading @@ -60,6 +60,7 @@ public class BadgeRenderer { int size = (int) (DOT_SCALE * mDotCenterOffset); ShadowGenerator.Builder builder = new ShadowGenerator.Builder(Color.TRANSPARENT); builder.ambientShadowAlpha = 88; mBackgroundWithShadow = builder.setupBlurForSize(size).createPill(size, size); mCircleRadius = builder.radius; Loading
src/com/android/launcher3/folder/FolderIcon.java +1 −5 Original line number Diff line number Diff line Loading @@ -25,7 +25,6 @@ import android.content.Context; import android.graphics.Canvas; import android.graphics.Point; import android.graphics.Rect; import android.graphics.Region; import android.graphics.drawable.Drawable; import android.os.Parcelable; import android.support.annotation.NonNull; Loading Loading @@ -483,10 +482,7 @@ public class FolderIcon extends FrameLayout implements FolderListener { public void drawBadge(Canvas canvas) { if ((mBadgeInfo != null && mBadgeInfo.hasBadge()) || mBadgeScale > 0) { int offsetX = mBackground.getOffsetX(); int offsetY = mBackground.getOffsetY(); int previewSize = (int) (mBackground.previewSize * mBackground.mScale); mTempBounds.set(offsetX, offsetY, offsetX + previewSize, offsetY + previewSize); BubbleTextView.getIconBounds(this, mTempBounds, mLauncher.getDeviceProfile().iconSizePx); // If we are animating to the accepting state, animate the badge out. float badgeScale = Math.max(0, mBadgeScale - mBackground.getScaleProgress()); Loading