summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/graphics
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2018-05-04 13:19:29 -0700
committerSunny Goyal <sunnygoyal@google.com>2018-05-08 08:29:43 -0700
commit927447e71d5daef2bbd4ed313a41d3ef9759cb18 (patch)
tree4a2cac36db8c0d48ff2ae0e0229a8095fae39e34 /src/com/android/launcher3/graphics
parent729020d186406dffe3dc9300ee32a2ac974c4dff (diff)
downloadandroid_packages_apps_Trebuchet-927447e71d5daef2bbd4ed313a41d3ef9759cb18.tar.gz
android_packages_apps_Trebuchet-927447e71d5daef2bbd4ed313a41d3ef9759cb18.tar.bz2
android_packages_apps_Trebuchet-927447e71d5daef2bbd4ed313a41d3ef9759cb18.zip
Chaniging all-apps scrim
> Converting the scrim to View, to better avoid overdraw > Overview and Spring loaded state have different scrim alpha > When going from overview to all-apps, there is a color scrim drawn over the overview panel. The slef color is merged with this color to prevent overdraw, and the remaining screen is drawn with a cut-out round rect path Bug: 79111591 Change-Id: I26801fde13dd6adb4b06110bbe8087e35cc31847
Diffstat (limited to 'src/com/android/launcher3/graphics')
-rw-r--r--src/com/android/launcher3/graphics/WorkspaceAndHotseatScrim.java10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/com/android/launcher3/graphics/WorkspaceAndHotseatScrim.java b/src/com/android/launcher3/graphics/WorkspaceAndHotseatScrim.java
index 5c991e966..136528db2 100644
--- a/src/com/android/launcher3/graphics/WorkspaceAndHotseatScrim.java
+++ b/src/com/android/launcher3/graphics/WorkspaceAndHotseatScrim.java
@@ -61,7 +61,6 @@ public class WorkspaceAndHotseatScrim extends ViewScrim<Workspace> implements
private int mFullScrimColor;
- private final int mMaxAlpha;
private int mAlpha = 0;
public WorkspaceAndHotseatScrim(Workspace view) {
@@ -69,7 +68,6 @@ public class WorkspaceAndHotseatScrim extends ViewScrim<Workspace> implements
mLauncher = Launcher.getLauncher(view.getContext());
mWallpaperColorInfo = WallpaperColorInfo.getInstance(mLauncher);
- mMaxAlpha = mLauncher.getResources().getInteger(R.integer.config_workspaceScrimAlpha);
mMaskHeight = Utilities.pxFromDp(ALPHA_MASK_BITMAP_DP,
view.getResources().getDisplayMetrics());
@@ -108,7 +106,7 @@ public class WorkspaceAndHotseatScrim extends ViewScrim<Workspace> implements
@Override
protected void onProgressChanged() {
- mAlpha = Math.round(mMaxAlpha * mProgress);
+ mAlpha = Math.round(255 * mProgress);
}
@Override
@@ -126,9 +124,9 @@ public class WorkspaceAndHotseatScrim extends ViewScrim<Workspace> implements
public void onExtractedColorsChanged(WallpaperColorInfo wallpaperColorInfo) {
// for super light wallpaper it needs to be darken for contrast to workspace
// for dark wallpapers the text is white so darkening works as well
- mFullScrimColor = ColorUtils.compositeColors(DARK_SCRIM_COLOR,
- wallpaperColorInfo.getMainColor());
- mBottomMaskPaint.setColor(mFullScrimColor);
+ mBottomMaskPaint.setColor(ColorUtils.compositeColors(DARK_SCRIM_COLOR,
+ wallpaperColorInfo.getMainColor()));
+ mFullScrimColor = wallpaperColorInfo.getMainColor();
}
public Bitmap createDitheredAlphaMask() {