Adjust notification dots
- Use consistent bounds for folders as other icons, to ensure dot
has a consistent placement (moved right+up a bit)
- Strengthen the ambient shadow to improve contrast
- Increased blur size and opacity
- Use a dark gray rather than black for dots on dark folders
Bug: 73331123
Change-Id: I888f4645d3a48465af93f5003dda8f8b7c3129f3
diff --git a/src/com/android/launcher3/folder/FolderIcon.java b/src/com/android/launcher3/folder/FolderIcon.java
index cb5d872..bdc40d7 100644
--- a/src/com/android/launcher3/folder/FolderIcon.java
+++ b/src/com/android/launcher3/folder/FolderIcon.java
@@ -25,7 +25,6 @@
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;
@@ -490,10 +489,7 @@
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());
diff --git a/src/com/android/launcher3/folder/PreviewBackground.java b/src/com/android/launcher3/folder/PreviewBackground.java
index 069ec4b..b162fcf 100644
--- a/src/com/android/launcher3/folder/PreviewBackground.java
+++ b/src/com/android/launcher3/folder/PreviewBackground.java
@@ -38,6 +38,7 @@
import com.android.launcher3.DeviceProfile;
import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherAnimUtils;
+import com.android.launcher3.R;
import com.android.launcher3.util.Themes;
/**
@@ -70,6 +71,7 @@
float mScale = 1f;
private float mColorMultiplier = 1f;
private int mBgColor;
+ private int mBadgeColor;
private float mStrokeWidth;
private int mStrokeAlpha = MAX_BG_OPACITY;
private int mShadowAlpha = 255;
@@ -132,6 +134,7 @@
int availableSpaceX, int topPadding) {
mInvalidateDelegate = invalidateDelegate;
mBgColor = Themes.getAttrColor(launcher, android.R.attr.colorPrimary);
+ mBadgeColor = Themes.getAttrColor(launcher, R.attr.folderBadgeColor);
DeviceProfile grid = launcher.getDeviceProfile();
previewSize = grid.folderIconSizePx;
@@ -198,7 +201,7 @@
}
public int getBadgeColor() {
- return mBgColor;
+ return mBadgeColor;
}
public void drawBackground(Canvas canvas) {