summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author FEI WU <nuswufei@google.com> 2016-11-09 14:12:29 -0800
committer FEI WU <nuswufei@google.com> 2016-11-09 15:53:46 -0800
commit9072dcd82c8c09ec2758726dfa197f02079fd0f7 (patch)
tree398e79be4686b2721f0f72c774c42e86d765543b
parentd478287ab9c39ed154b01e5ee44f796d571532c5 (diff)
Update colorPrimary in watch
1. Update colorPrimary in watch. This value is only used for icons and switch background on watch. 2. Replace hard coded color and disable alpha in switch track. 3. Rename watch_switch_track_mtrl_alpha to be watch_switch_track_mtrl since it's no longer a alpha mask. Change-Id: Ia1eaae62a934c89e3ca6cc8736b256c552f0329b
-rw-r--r--core/res/res/color/watch_switch_track_color_material.xml (renamed from core/res/res/drawable/watch_switch_track_material.xml)15
-rw-r--r--core/res/res/drawable-hdpi/watch_switch_track_mtrl.png (renamed from core/res/res/drawable-hdpi/watch_switch_track_mtrl_alpha.png)bin910 -> 910 bytes
-rw-r--r--core/res/res/drawable-xhdpi/watch_switch_track_mtrl.png (renamed from core/res/res/drawable-xhdpi/watch_switch_track_mtrl_alpha.png)bin1248 -> 1248 bytes
-rw-r--r--core/res/res/drawable-xxhdpi/watch_switch_track_mtrl.png (renamed from core/res/res/drawable-xxhdpi/watch_switch_track_mtrl_alpha.png)bin1992 -> 1992 bytes
-rw-r--r--core/res/res/layout-watch/preference_widget_switch.xml3
-rw-r--r--core/res/res/values-watch/colors_material.xml2
6 files changed, 11 insertions, 9 deletions
diff --git a/core/res/res/drawable/watch_switch_track_material.xml b/core/res/res/color/watch_switch_track_color_material.xml
index 79e92a331071..c7dc5d34204a 100644
--- a/core/res/res/drawable/watch_switch_track_material.xml
+++ b/core/res/res/color/watch_switch_track_color_material.xml
@@ -1,9 +1,12 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (C) 2016 The Android Open Source Project
+
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
+
http://www.apache.org/licenses/LICENSE-2.0
+
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -12,10 +15,8 @@
-->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
- <item android:state_enabled="false">
- <bitmap android:alpha="0.1" android:src="@drawable/watch_switch_track_mtrl_alpha" />
- </item>
- <item>
- <bitmap android:alpha="0.2" android:src="@drawable/watch_switch_track_mtrl_alpha" />
- </item>
-</selector>
+ <item android:state_enabled="false"
+ android:alpha="?attr/disabledAlpha"
+ android:color="?android:colorPrimary" />
+ <item android:color="?android:colorPrimary" />
+</selector> \ No newline at end of file
diff --git a/core/res/res/drawable-hdpi/watch_switch_track_mtrl_alpha.png b/core/res/res/drawable-hdpi/watch_switch_track_mtrl.png
index ecee3e137ef6..ecee3e137ef6 100644
--- a/core/res/res/drawable-hdpi/watch_switch_track_mtrl_alpha.png
+++ b/core/res/res/drawable-hdpi/watch_switch_track_mtrl.png
Binary files differ
diff --git a/core/res/res/drawable-xhdpi/watch_switch_track_mtrl_alpha.png b/core/res/res/drawable-xhdpi/watch_switch_track_mtrl.png
index 1aa544227380..1aa544227380 100644
--- a/core/res/res/drawable-xhdpi/watch_switch_track_mtrl_alpha.png
+++ b/core/res/res/drawable-xhdpi/watch_switch_track_mtrl.png
Binary files differ
diff --git a/core/res/res/drawable-xxhdpi/watch_switch_track_mtrl_alpha.png b/core/res/res/drawable-xxhdpi/watch_switch_track_mtrl.png
index af2042be7f59..af2042be7f59 100644
--- a/core/res/res/drawable-xxhdpi/watch_switch_track_mtrl_alpha.png
+++ b/core/res/res/drawable-xxhdpi/watch_switch_track_mtrl.png
Binary files differ
diff --git a/core/res/res/layout-watch/preference_widget_switch.xml b/core/res/res/layout-watch/preference_widget_switch.xml
index 5881cf0c4d1e..a1a845abfe3a 100644
--- a/core/res/res/layout-watch/preference_widget_switch.xml
+++ b/core/res/res/layout-watch/preference_widget_switch.xml
@@ -24,7 +24,8 @@
android:thumb="@drawable/watch_switch_thumb_material_anim"
android:thumbTint="@color/watch_switch_thumb_color_material"
android:thumbTintMode="multiply"
- android:track="@drawable/watch_switch_track_material"
+ android:track="@drawable/watch_switch_track_mtrl"
+ android:trackTint="@color/watch_switch_track_color_material"
android:focusable="false"
android:clickable="false"
android:background="@null" />
diff --git a/core/res/res/values-watch/colors_material.xml b/core/res/res/values-watch/colors_material.xml
index 18bfd4db5ae0..92f77622a2a2 100644
--- a/core/res/res/values-watch/colors_material.xml
+++ b/core/res/res/values-watch/colors_material.xml
@@ -22,7 +22,7 @@
<color name="accent_material_dark">#ff5e97f6</color>
<color name="accent_material_50">#ffd0def7</color>
- <color name="primary_material_dark">#4D4D4D</color>
+ <color name="primary_material_dark">#33ffffff</color>
<color name="button_material_dark">#ff919699</color>
</resources>