summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTreeHugger Robot <treehugger-gerrit@google.com>2018-05-24 21:09:16 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2018-05-24 21:09:16 +0000
commita252a075622d357f8e79ffb66575c9faa7903878 (patch)
treeb4e6c8791016a95ccceb8809c12e42ca0daf1630
parent96bc904deddf244d3d75dc44dd5326d0cf812857 (diff)
parenta6afdffbbd261e54a5eaeb7bc2d6a5a0d1b5f91a (diff)
downloadandroid_packages_apps_Trebuchet-a252a075622d357f8e79ffb66575c9faa7903878.tar.gz
android_packages_apps_Trebuchet-a252a075622d357f8e79ffb66575c9faa7903878.tar.bz2
android_packages_apps_Trebuchet-a252a075622d357f8e79ffb66575c9faa7903878.zip
Merge "Adding support for dark text on dark theme" into ub-launcher3-edmonton
-rw-r--r--res/values/styles.xml11
-rw-r--r--src/com/android/launcher3/BaseDraggingActivity.java8
2 files changed, 14 insertions, 5 deletions
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 631626f44..2b760f349 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -45,7 +45,7 @@
<style name="LauncherTheme" parent="@style/BaseLauncherThemeWithCustomAttrs"></style>
- <style name="LauncherThemeDarkText" parent="@style/LauncherTheme">
+ <style name="LauncherTheme.DarkText" parent="@style/LauncherTheme">
<item name="workspaceTextColor">#FF212121</item>
<item name="workspaceShadowColor">@android:color/transparent</item>
<item name="workspaceAmbientShadowColor">@android:color/transparent</item>
@@ -70,6 +70,15 @@
<item name="isMainColorDark">true</item>
</style>
+ <style name="LauncherThemeDark.DarKText" parent="@style/LauncherThemeDark">
+ <item name="workspaceTextColor">#FF212121</item>
+ <item name="workspaceShadowColor">@android:color/transparent</item>
+ <item name="workspaceAmbientShadowColor">@android:color/transparent</item>
+ <item name="workspaceKeyShadowColor">@android:color/transparent</item>
+ <item name="isWorkspaceDarkText">true</item>
+ <item name="workspaceStatusBarScrim">@null</item>
+ </style>
+
<!--
Theme overrides to element on homescreen, i.e., which are drawn on top on wallpaper.
Various foreground colors are overridden to be workspaceTextColor so that they are properly
diff --git a/src/com/android/launcher3/BaseDraggingActivity.java b/src/com/android/launcher3/BaseDraggingActivity.java
index d9e7d2033..8af9acc24 100644
--- a/src/com/android/launcher3/BaseDraggingActivity.java
+++ b/src/com/android/launcher3/BaseDraggingActivity.java
@@ -90,11 +90,11 @@ public abstract class BaseDraggingActivity extends BaseActivity
protected int getThemeRes(WallpaperColorInfo wallpaperColorInfo) {
if (wallpaperColorInfo.isDark()) {
- return R.style.LauncherThemeDark;
- } else if (wallpaperColorInfo.supportsDarkText()) {
- return R.style.LauncherThemeDarkText;
+ return wallpaperColorInfo.supportsDarkText() ?
+ R.style.LauncherThemeDark_DarKText : R.style.LauncherThemeDark;
} else {
- return R.style.LauncherTheme;
+ return wallpaperColorInfo.supportsDarkText() ?
+ R.style.LauncherTheme_DarkText : R.style.LauncherTheme;
}
}