Loading src/com/android/launcher3/allapps/AllAppsSectionDecorator.java +2 −3 Original line number Diff line number Diff line Loading @@ -110,7 +110,6 @@ public class AllAppsSectionDecorator extends RecyclerView.ItemDecoration { */ public static class SectionDecorationHandler { private static final int FILL_ALPHA = 0; private static final int FOCUS_ALPHA = (int) (.9f * 255); protected RectF mBounds = new RectF(); private final boolean mIsFullWidth; Loading @@ -123,9 +122,9 @@ public class AllAppsSectionDecorator extends RecyclerView.ItemDecoration { public SectionDecorationHandler(Context context, boolean isFullWidth) { mIsFullWidth = isFullWidth; int endScrim = Themes.getAttrColor(context, R.attr.allAppsScrimColor); int endScrim = Themes.getColorBackground(context); mFillcolor = ColorUtils.setAlphaComponent(endScrim, FILL_ALPHA); mFocusColor = ColorUtils.setAlphaComponent(endScrim, FOCUS_ALPHA); mFocusColor = endScrim; mRadius = Themes.getDialogCornerRadius(context); } Loading src/com/android/launcher3/util/Themes.java +5 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,11 @@ public class Themes { return getAttrColor(context, android.R.attr.colorAccent); } /** Returns the floating background color attribute. */ public static int getColorBackground(Context context) { return getAttrColor(context, android.R.attr.colorBackground); } /** Returns the floating background color attribute. */ public static int getColorBackgroundFloating(Context context) { return getAttrColor(context, android.R.attr.colorBackgroundFloating); Loading src/com/android/launcher3/views/ScrimView.java +2 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ import com.android.launcher3.util.Themes; */ public class ScrimView<T extends Launcher> extends View implements Insettable, OnChangeListener { private static final float SCRIM_ALPHA = .75f; private static final float SCRIM_ALPHA = .95f; protected final T mLauncher; private final WallpaperColorInfo mWallpaperColorInfo; protected final int mEndScrim; Loading @@ -63,6 +63,7 @@ public class ScrimView<T extends Launcher> extends View implements Insettable, O mWallpaperColorInfo = WallpaperColorInfo.INSTANCE.get(context); int endScrim = Themes.getAttrColor(context, R.attr.allAppsScrimColor); if (FeatureFlags.ENABLE_DEVICE_SEARCH.get()) { endScrim = Themes.getColorBackgroundFloating(context); endScrim = ColorUtils.setAlphaComponent(endScrim, (int) (255 * SCRIM_ALPHA)); } mEndScrim = endScrim; Loading Loading
src/com/android/launcher3/allapps/AllAppsSectionDecorator.java +2 −3 Original line number Diff line number Diff line Loading @@ -110,7 +110,6 @@ public class AllAppsSectionDecorator extends RecyclerView.ItemDecoration { */ public static class SectionDecorationHandler { private static final int FILL_ALPHA = 0; private static final int FOCUS_ALPHA = (int) (.9f * 255); protected RectF mBounds = new RectF(); private final boolean mIsFullWidth; Loading @@ -123,9 +122,9 @@ public class AllAppsSectionDecorator extends RecyclerView.ItemDecoration { public SectionDecorationHandler(Context context, boolean isFullWidth) { mIsFullWidth = isFullWidth; int endScrim = Themes.getAttrColor(context, R.attr.allAppsScrimColor); int endScrim = Themes.getColorBackground(context); mFillcolor = ColorUtils.setAlphaComponent(endScrim, FILL_ALPHA); mFocusColor = ColorUtils.setAlphaComponent(endScrim, FOCUS_ALPHA); mFocusColor = endScrim; mRadius = Themes.getDialogCornerRadius(context); } Loading
src/com/android/launcher3/util/Themes.java +5 −0 Original line number Diff line number Diff line Loading @@ -81,6 +81,11 @@ public class Themes { return getAttrColor(context, android.R.attr.colorAccent); } /** Returns the floating background color attribute. */ public static int getColorBackground(Context context) { return getAttrColor(context, android.R.attr.colorBackground); } /** Returns the floating background color attribute. */ public static int getColorBackgroundFloating(Context context) { return getAttrColor(context, android.R.attr.colorBackgroundFloating); Loading
src/com/android/launcher3/views/ScrimView.java +2 −1 Original line number Diff line number Diff line Loading @@ -42,7 +42,7 @@ import com.android.launcher3.util.Themes; */ public class ScrimView<T extends Launcher> extends View implements Insettable, OnChangeListener { private static final float SCRIM_ALPHA = .75f; private static final float SCRIM_ALPHA = .95f; protected final T mLauncher; private final WallpaperColorInfo mWallpaperColorInfo; protected final int mEndScrim; Loading @@ -63,6 +63,7 @@ public class ScrimView<T extends Launcher> extends View implements Insettable, O mWallpaperColorInfo = WallpaperColorInfo.INSTANCE.get(context); int endScrim = Themes.getAttrColor(context, R.attr.allAppsScrimColor); if (FeatureFlags.ENABLE_DEVICE_SEARCH.get()) { endScrim = Themes.getColorBackgroundFloating(context); endScrim = ColorUtils.setAlphaComponent(endScrim, (int) (255 * SCRIM_ALPHA)); } mEndScrim = endScrim; Loading