From ba3a1359bae332071f658d65263344c820bf7656 Mon Sep 17 00:00:00 2001 From: FEI WU Date: Mon, 18 Jul 2016 16:41:25 -0700 Subject: [PATCH] Fix Switch in SwitchPreference on watch 1. Add new layout for SwitchPreference on watch. 2. Add materials for new thumb and track. Animation for the thumb follows the same pattern as current thumb. Bug:26309808 Change-Id: I117a5f31780528b0348fcbc22a0aaadf0b943e04 --- .../watch_switch_thumb_to_off_animation.xml | 36 ++++++++++++++++++ .../watch_switch_thumb_to_on_animation.xml | 37 +++++++++++++++++++ .../watch_switch_thumb_color_material.xml | 17 +++++++++ .../drawable/watch_switch_thumb_material.xml | 27 ++++++++++++++ .../watch_switch_thumb_material_anim.xml | 35 ++++++++++++++++++ .../watch_switch_thumb_to_off_anim_mtrl.xml | 19 ++++++++++ .../watch_switch_thumb_to_on_anim_mtrl.xml | 19 ++++++++++ .../drawable/watch_switch_track_material.xml | 23 ++++++++++++ .../layout-watch/preference_widget_switch.xml | 30 +++++++++++++++ 9 files changed, 243 insertions(+) create mode 100644 core/res/res/anim/watch_switch_thumb_to_off_animation.xml create mode 100644 core/res/res/anim/watch_switch_thumb_to_on_animation.xml create mode 100644 core/res/res/color/watch_switch_thumb_color_material.xml create mode 100644 core/res/res/drawable/watch_switch_thumb_material.xml create mode 100644 core/res/res/drawable/watch_switch_thumb_material_anim.xml create mode 100644 core/res/res/drawable/watch_switch_thumb_to_off_anim_mtrl.xml create mode 100644 core/res/res/drawable/watch_switch_thumb_to_on_anim_mtrl.xml create mode 100644 core/res/res/drawable/watch_switch_track_material.xml create mode 100644 core/res/res/layout-watch/preference_widget_switch.xml diff --git a/core/res/res/anim/watch_switch_thumb_to_off_animation.xml b/core/res/res/anim/watch_switch_thumb_to_off_animation.xml new file mode 100644 index 0000000000000..cd02e0db2fd56 --- /dev/null +++ b/core/res/res/anim/watch_switch_thumb_to_off_animation.xml @@ -0,0 +1,36 @@ + + + + + + + diff --git a/core/res/res/anim/watch_switch_thumb_to_on_animation.xml b/core/res/res/anim/watch_switch_thumb_to_on_animation.xml new file mode 100644 index 0000000000000..e644217766050 --- /dev/null +++ b/core/res/res/anim/watch_switch_thumb_to_on_animation.xml @@ -0,0 +1,37 @@ + + + + + + + + diff --git a/core/res/res/color/watch_switch_thumb_color_material.xml b/core/res/res/color/watch_switch_thumb_color_material.xml new file mode 100644 index 0000000000000..a931724f34196 --- /dev/null +++ b/core/res/res/color/watch_switch_thumb_color_material.xml @@ -0,0 +1,17 @@ + + + + + + + \ No newline at end of file diff --git a/core/res/res/drawable/watch_switch_thumb_material.xml b/core/res/res/drawable/watch_switch_thumb_material.xml new file mode 100644 index 0000000000000..3463a4f546846 --- /dev/null +++ b/core/res/res/drawable/watch_switch_thumb_material.xml @@ -0,0 +1,27 @@ + + + + + + + + diff --git a/core/res/res/drawable/watch_switch_thumb_material_anim.xml b/core/res/res/drawable/watch_switch_thumb_material_anim.xml new file mode 100644 index 0000000000000..686fb976cf1c1 --- /dev/null +++ b/core/res/res/drawable/watch_switch_thumb_material_anim.xml @@ -0,0 +1,35 @@ + + + + + + + + + + diff --git a/core/res/res/drawable/watch_switch_thumb_to_off_anim_mtrl.xml b/core/res/res/drawable/watch_switch_thumb_to_off_anim_mtrl.xml new file mode 100644 index 0000000000000..2c6ba2f757534 --- /dev/null +++ b/core/res/res/drawable/watch_switch_thumb_to_off_anim_mtrl.xml @@ -0,0 +1,19 @@ + + + + + + diff --git a/core/res/res/drawable/watch_switch_thumb_to_on_anim_mtrl.xml b/core/res/res/drawable/watch_switch_thumb_to_on_anim_mtrl.xml new file mode 100644 index 0000000000000..9f92361e70ea6 --- /dev/null +++ b/core/res/res/drawable/watch_switch_thumb_to_on_anim_mtrl.xml @@ -0,0 +1,19 @@ + + + + + + diff --git a/core/res/res/drawable/watch_switch_track_material.xml b/core/res/res/drawable/watch_switch_track_material.xml new file mode 100644 index 0000000000000..00cdadb1b59db --- /dev/null +++ b/core/res/res/drawable/watch_switch_track_material.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/core/res/res/layout-watch/preference_widget_switch.xml b/core/res/res/layout-watch/preference_widget_switch.xml new file mode 100644 index 0000000000000..37d0c6bf1af68 --- /dev/null +++ b/core/res/res/layout-watch/preference_widget_switch.xml @@ -0,0 +1,30 @@ + + + + +