From e797692edb34fd2d301b77bd4550b0485f1acb42 Mon Sep 17 00:00:00 2001 From: Michael Kwan Date: Wed, 3 Aug 2016 21:54:59 -0700 Subject: [PATCH] Add colours for disabled state for switch in SwitchPreference for watch devices. Bug: 30578046 Change-Id: I692f6375a73c9d334d576d3eca7f9721af120e30 --- .../watch_switch_thumb_color_material.xml | 10 ++++----- .../watch_switch_track_color_material.xml | 21 +++++++++++++++++++ .../layout-watch/preference_widget_switch.xml | 2 +- 3 files changed, 27 insertions(+), 6 deletions(-) create mode 100644 core/res/res/color/watch_switch_track_color_material.xml diff --git a/core/res/res/color/watch_switch_thumb_color_material.xml b/core/res/res/color/watch_switch_thumb_color_material.xml index d4796a0326316..f78d9b62a509b 100644 --- a/core/res/res/color/watch_switch_thumb_color_material.xml +++ b/core/res/res/color/watch_switch_thumb_color_material.xml @@ -10,9 +10,9 @@ See the License for the specific language governing permissions and limitations under the License. --> - - - - - \ No newline at end of file + + + + diff --git a/core/res/res/color/watch_switch_track_color_material.xml b/core/res/res/color/watch_switch_track_color_material.xml new file mode 100644 index 0000000000000..402a536b4d128 --- /dev/null +++ b/core/res/res/color/watch_switch_track_color_material.xml @@ -0,0 +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 37d0c6bf1af68..ffc00b4d1c1a0 100644 --- a/core/res/res/layout-watch/preference_widget_switch.xml +++ b/core/res/res/layout-watch/preference_widget_switch.xml @@ -24,7 +24,7 @@ android:thumb="@drawable/watch_switch_thumb_material_anim" android:thumbTint="@color/watch_switch_thumb_color_material" android:track="@drawable/watch_switch_track_material" - android:trackTint="?android:colorPrimary" + android:trackTint="@color/watch_switch_track_color_material" android:focusable="false" android:clickable="false" android:background="@null" />