summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/allapps
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2017-05-24 13:19:15 -0700
committerSunny Goyal <sunnygoyal@google.com>2017-05-24 14:34:04 -0700
commit368ae772018c12349d7bf1b27d8817e7644b08c2 (patch)
tree9163783e4105f12f41bcc3a36d43ba6f58eaa064 /src/com/android/launcher3/allapps
parent94652a207ff0ae5dcfa436bcdfad3538466fca3d (diff)
downloadandroid_packages_apps_Trebuchet-368ae772018c12349d7bf1b27d8817e7644b08c2.tar.gz
android_packages_apps_Trebuchet-368ae772018c12349d7bf1b27d8817e7644b08c2.tar.bz2
android_packages_apps_Trebuchet-368ae772018c12349d7bf1b27d8817e7644b08c2.zip
Defining a dark theme for launcher
> Removing the code for LIGHT_STATUS_BAR as that will be controlled by the theme > Updating icon cache to always use transparent background for low-res, as the theme can change the bg color Change-Id: Iab64ec29cab629ee515af22ec15b95d3f40a9df5
Diffstat (limited to 'src/com/android/launcher3/allapps')
-rw-r--r--src/com/android/launcher3/allapps/AllAppsTransitionController.java8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/com/android/launcher3/allapps/AllAppsTransitionController.java b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
index 5182a5b43..4f2e3d73e 100644
--- a/src/com/android/launcher3/allapps/AllAppsTransitionController.java
+++ b/src/com/android/launcher3/allapps/AllAppsTransitionController.java
@@ -71,6 +71,7 @@ public class AllAppsTransitionController implements TouchController, VerticalPul
private final Launcher mLauncher;
private final VerticalPullDetector mDetector;
private final ArgbEvaluator mEvaluator;
+ private final boolean mIsDarkTheme;
// Animation in this class is controlled by a single variable {@link mProgress}.
// Visually, it represents top y coordinate of the all apps container if multiplied with
@@ -112,6 +113,7 @@ public class AllAppsTransitionController implements TouchController, VerticalPul
mEvaluator = new ArgbEvaluator();
mAllAppsBackgroundColor = Themes.getAttrColor(l, android.R.attr.colorPrimary);
mLauncher.getExtractedColors().addOnChangeListener(this);
+ mIsDarkTheme = Themes.getAttrBoolean(mLauncher, R.attr.isPrimaryColorDark);
}
@Override
@@ -275,9 +277,9 @@ public class AllAppsTransitionController implements TouchController, VerticalPul
}
private void updateLightStatusBar(float shift) {
- // Do not modify status bar on landscape as all apps is not full bleed.
- if (!FeatureFlags.LAUNCHER3_GRADIENT_ALL_APPS
- && mLauncher.getDeviceProfile().isVerticalBarLayout()) {
+ // Do not modify status bar in dark theme or on landscape as all apps is not full bleed.
+ if (mIsDarkTheme || (!FeatureFlags.LAUNCHER3_GRADIENT_ALL_APPS
+ && mLauncher.getDeviceProfile().isVerticalBarLayout())) {
return;
}
// Use a light status bar (dark icons) if all apps is behind at least half of the status