summaryrefslogtreecommitdiffstats
path: root/res
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2017-06-11 20:22:08 -0700
committerSunny Goyal <sunnygoyal@google.com>2017-06-11 20:24:02 -0700
commit325b5c7a6640cfe04b382ac39148d2601ccfad44 (patch)
treed933f11e6b7480560619afc0a9fef34e6852fda4 /res
parent7886c037f87ba2274e95b160d125b02bb3928449 (diff)
downloadandroid_packages_apps_Trebuchet-325b5c7a6640cfe04b382ac39148d2601ccfad44.tar.gz
android_packages_apps_Trebuchet-325b5c7a6640cfe04b382ac39148d2601ccfad44.tar.bz2
android_packages_apps_Trebuchet-325b5c7a6640cfe04b382ac39148d2601ccfad44.zip
Some theme fixes
> workspaceTextColor was not clearly defined to white and relied on HomeScreenElementTheme > Not all attributes were defined in sw720dp. Created a interm style to avoid such errors > Applying proper tint to resize frame > Fixing shadow colors for homescreen icon Change-Id: If8441011c968291de50b2fd8d7612ce3d5353b95
Diffstat (limited to 'res')
-rw-r--r--res/layout/app_widget_resize_frame.xml21
-rw-r--r--res/values-sw720dp/styles.xml10
-rw-r--r--res/values-v19/styles.xml2
-rw-r--r--res/values-v21/styles.xml2
-rw-r--r--res/values/styles.xml22
5 files changed, 27 insertions, 30 deletions
diff --git a/res/layout/app_widget_resize_frame.xml b/res/layout/app_widget_resize_frame.xml
index 91a1e45a0..874fecccf 100644
--- a/res/layout/app_widget_resize_frame.xml
+++ b/res/layout/app_widget_resize_frame.xml
@@ -20,38 +20,43 @@
android:layout_height="match_parent"
android:background="@drawable/widget_resize_shadow"
android:foreground="@drawable/widget_resize_frame"
+ android:foregroundTint="?attr/workspaceTextColor"
android:padding="0dp" >
<!-- Left -->
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:src="@drawable/ic_widget_resize_handle"
android:layout_gravity="left|center_vertical"
- android:layout_marginLeft="@dimen/widget_handle_margin" />
+ android:layout_marginLeft="@dimen/widget_handle_margin"
+ android:src="@drawable/ic_widget_resize_handle"
+ android:tint="?attr/workspaceTextColor" />
<!-- Top -->
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:src="@drawable/ic_widget_resize_handle"
android:layout_gravity="top|center_horizontal"
- android:layout_marginTop="@dimen/widget_handle_margin" />
+ android:layout_marginTop="@dimen/widget_handle_margin"
+ android:src="@drawable/ic_widget_resize_handle"
+ android:tint="?attr/workspaceTextColor" />
<!-- Right -->
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:src="@drawable/ic_widget_resize_handle"
android:layout_gravity="right|center_vertical"
- android:layout_marginRight="@dimen/widget_handle_margin" />
+ android:layout_marginRight="@dimen/widget_handle_margin"
+ android:src="@drawable/ic_widget_resize_handle"
+ android:tint="?attr/workspaceTextColor" />
<!-- Bottom -->
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
- android:src="@drawable/ic_widget_resize_handle"
android:layout_gravity="bottom|center_horizontal"
- android:layout_marginBottom="@dimen/widget_handle_margin" />
+ android:layout_marginBottom="@dimen/widget_handle_margin"
+ android:src="@drawable/ic_widget_resize_handle"
+ android:tint="?attr/workspaceTextColor" />
</com.android.launcher3.AppWidgetResizeFrame> \ No newline at end of file
diff --git a/res/values-sw720dp/styles.xml b/res/values-sw720dp/styles.xml
index 5cfe84ffc..bb0dbc221 100644
--- a/res/values-sw720dp/styles.xml
+++ b/res/values-sw720dp/styles.xml
@@ -27,22 +27,12 @@
<item name="android:windowActionModeOverlay">true</item>
<item name="android:colorEdgeEffect">?android:attr/textColorSecondary</item>
<item name="android:keyboardLayout">@layout/all_apps_search_container</item>
- <item name="allAppsScrimColor">#DDFFFFFF</item>
- <item name="popupColorPrimary">#FFF</item>
- <item name="popupColorSecondary">#F5F5F5</item> <!-- Gray 100 -->
- <item name="popupColorTertiary">#E0E0E0</item> <!-- Gray 300 -->
- <item name="isMainColorDark">false</item>
- <item name="isWorkspaceDarkText">false</item>
- <item name="workspaceTextColor">?android:textColorPrimary</item>
- <item name="workspaceAmbientShadowColor">#22000000</item>
- <item name="workspaceKeyShadowColor">#44000000</item>
</style>
<!-- Workspace -->
<style name="DropTargetButton" parent="DropTargetButtonBase">
<item name="android:paddingLeft">60dp</item>
<item name="android:paddingRight">60dp</item>
- <item name="android:shadowColor">?attr/workspaceShadowColor</item>
<item name="android:shadowDx">0.0</item>
<item name="android:shadowDy">0.0</item>
<item name="android:shadowRadius">2.0</item>
diff --git a/res/values-v19/styles.xml b/res/values-v19/styles.xml
index cfc7c0f9c..36c09718e 100644
--- a/res/values-v19/styles.xml
+++ b/res/values-v19/styles.xml
@@ -18,7 +18,7 @@
-->
<resources>
- <style name="LauncherTheme" parent="@style/BaseLauncherTheme">
+ <style name="LauncherTheme" parent="@style/BaseLauncherThemeWithCustomAttrs">
<item name="android:windowTranslucentStatus">true</item>
<item name="android:windowTranslucentNavigation">true</item>
</style>
diff --git a/res/values-v21/styles.xml b/res/values-v21/styles.xml
index 8d3de0153..927719cc1 100644
--- a/res/values-v21/styles.xml
+++ b/res/values-v21/styles.xml
@@ -18,7 +18,7 @@
-->
<resources>
- <style name="LauncherTheme" parent="@style/BaseLauncherTheme">
+ <style name="LauncherTheme" parent="@style/BaseLauncherThemeWithCustomAttrs">
<item name="android:windowTranslucentStatus">false</item>
<item name="android:windowTranslucentNavigation">false</item>
<item name="android:windowDrawsSystemBarBackgrounds">true</item>
diff --git a/res/values/styles.xml b/res/values/styles.xml
index 13bbe4204..8af6968a6 100644
--- a/res/values/styles.xml
+++ b/res/values/styles.xml
@@ -26,20 +26,23 @@
<item name="android:windowNoTitle">true</item>
<item name="android:colorEdgeEffect">#FF757575</item>
<item name="android:keyboardLayout">@layout/all_apps_search_container</item>
+ </style>
+
+ <style name="BaseLauncherThemeWithCustomAttrs" parent="@style/BaseLauncherTheme">
<item name="allAppsScrimColor">#DDFFFFFF</item>
<item name="popupColorPrimary">#FFF</item>
<item name="popupColorSecondary">#F5F5F5</item> <!-- Gray 100 -->
<item name="popupColorTertiary">#E0E0E0</item> <!-- Gray 300 -->
<item name="isMainColorDark">false</item>
<item name="isWorkspaceDarkText">false</item>
- <item name="workspaceTextColor">?android:textColorPrimary</item>
+ <item name="workspaceTextColor">@android:color/white</item>
<item name="workspaceShadowColor">#B0000000</item>
- <item name="workspaceAmbientShadowColor">#22000000</item>
+ <item name="workspaceAmbientShadowColor">#33000000</item>
<item name="workspaceKeyShadowColor">#44000000</item>
<item name="workspaceStatusBarScrim">@drawable/workspace_bg</item>
</style>
- <style name="LauncherTheme" parent="@style/BaseLauncherTheme"></style>
+ <style name="LauncherTheme" parent="@style/BaseLauncherThemeWithCustomAttrs"></style>
<style name="LauncherThemeDarkText" parent="@style/LauncherTheme">
<item name="workspaceTextColor">#FF212121</item>
@@ -66,13 +69,13 @@
<!--
Theme overrides to element on homescreen, i.e., which are drawn on top on wallpaper.
- Various foreground colors are overridden to be white so that they are properly visible on
- various wallpapers
+ Various foreground colors are overridden to be workspaceTextColor so that they are properly
+ visible on various wallpapers.
-->
<style name="HomeScreenElementTheme">
- <item name="android:colorEdgeEffect">@android:color/white</item>
- <item name="android:textColorPrimary">@android:color/white</item>
- <item name="android:textColorSecondary">@android:color/white</item>
+ <item name="android:colorEdgeEffect">?attr/workspaceTextColor</item>
+ <item name="android:textColorPrimary">?attr/workspaceTextColor</item>
+ <item name="android:textColorSecondary">?attr/workspaceTextColor</item>
</style>
<!-- Theme for the widget container. Overridden on API 26. -->
@@ -123,8 +126,7 @@
<style name="BaseIcon.Workspace">
<item name="customShadows">true</item>
<item name="android:shadowRadius">2.0</item>
- <item name="android:shadowColor">#B0000000</item>
- <item name="android:textColor">?attr/workspaceTextColor</item>
+ <item name="android:shadowColor">?attr/workspaceShadowColor</item>
<item name="keyShadowColor">?attr/workspaceKeyShadowColor</item>
<item name="ambientShadowColor">?attr/workspaceAmbientShadowColor</item>
</style>