From 21f989f8310060460140e5324aa51392a30fa7b4 Mon Sep 17 00:00:00 2001 From: FEI WU Date: Wed, 7 Sep 2016 10:49:53 -0700 Subject: [PATCH] Update Switch track in SwitchPreference on watch Use white color for switch track, alpha = 0.1 in disable state and alpha = 0.2 in other states. Change-Id: I17c570c14ff0d62f2eb18fef3c13df91ac16adc6 --- ...mtrl.png => watch_switch_track_mtrl_alpha.png} | Bin ...mtrl.png => watch_switch_track_mtrl_alpha.png} | Bin ...mtrl.png => watch_switch_track_mtrl_alpha.png} | Bin .../watch_switch_track_material.xml} | 14 +++++++------- .../res/layout-watch/preference_widget_switch.xml | 3 +-- 5 files changed, 8 insertions(+), 9 deletions(-) rename core/res/res/drawable-hdpi/{watch_switch_track_mtrl.png => watch_switch_track_mtrl_alpha.png} (100%) rename core/res/res/drawable-xhdpi/{watch_switch_track_mtrl.png => watch_switch_track_mtrl_alpha.png} (100%) rename core/res/res/drawable-xxhdpi/{watch_switch_track_mtrl.png => watch_switch_track_mtrl_alpha.png} (100%) rename core/res/res/{color/watch_switch_track_color_material.xml => drawable/watch_switch_track_material.xml} (74%) diff --git a/core/res/res/drawable-hdpi/watch_switch_track_mtrl.png b/core/res/res/drawable-hdpi/watch_switch_track_mtrl_alpha.png similarity index 100% rename from core/res/res/drawable-hdpi/watch_switch_track_mtrl.png rename to core/res/res/drawable-hdpi/watch_switch_track_mtrl_alpha.png diff --git a/core/res/res/drawable-xhdpi/watch_switch_track_mtrl.png b/core/res/res/drawable-xhdpi/watch_switch_track_mtrl_alpha.png similarity index 100% rename from core/res/res/drawable-xhdpi/watch_switch_track_mtrl.png rename to core/res/res/drawable-xhdpi/watch_switch_track_mtrl_alpha.png diff --git a/core/res/res/drawable-xxhdpi/watch_switch_track_mtrl.png b/core/res/res/drawable-xxhdpi/watch_switch_track_mtrl_alpha.png similarity index 100% rename from core/res/res/drawable-xxhdpi/watch_switch_track_mtrl.png rename to core/res/res/drawable-xxhdpi/watch_switch_track_mtrl_alpha.png diff --git a/core/res/res/color/watch_switch_track_color_material.xml b/core/res/res/drawable/watch_switch_track_material.xml similarity index 74% rename from core/res/res/color/watch_switch_track_color_material.xml rename to core/res/res/drawable/watch_switch_track_material.xml index 402a536b4d128..79e92a3310710 100644 --- a/core/res/res/color/watch_switch_track_color_material.xml +++ b/core/res/res/drawable/watch_switch_track_material.xml @@ -1,21 +1,21 @@ - + - - + + + + + + diff --git a/core/res/res/layout-watch/preference_widget_switch.xml b/core/res/res/layout-watch/preference_widget_switch.xml index a1a845abfe3ab..5881cf0c4d1ea 100644 --- a/core/res/res/layout-watch/preference_widget_switch.xml +++ b/core/res/res/layout-watch/preference_widget_switch.xml @@ -24,8 +24,7 @@ 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_mtrl" - android:trackTint="@color/watch_switch_track_color_material" + android:track="@drawable/watch_switch_track_material" android:focusable="false" android:clickable="false" android:background="@null" />