From 09be4b3c87998b9dca99383cb03c71c0889a01a7 Mon Sep 17 00:00:00 2001 From: Alan Viverette Date: Tue, 22 Jul 2014 16:11:01 -0700 Subject: [PATCH] Stop using framework-private switch asset BUG: 16467249 Change-Id: I0829c3dea522cf59e0f92046ea7c6092d416ad4c --- res/drawable/switch_inner.xml | 37 ------------------- res/drawable/switch_track.xml | 26 ------------- res/layout/switch_bar.xml | 3 +- res/values/themes.xml | 6 +++ .../android/settings/widget/SwitchBar.java | 3 -- 5 files changed, 8 insertions(+), 67 deletions(-) delete mode 100644 res/drawable/switch_inner.xml delete mode 100644 res/drawable/switch_track.xml diff --git a/res/drawable/switch_inner.xml b/res/drawable/switch_inner.xml deleted file mode 100644 index c6d39ef7382..00000000000 --- a/res/drawable/switch_inner.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - diff --git a/res/drawable/switch_track.xml b/res/drawable/switch_track.xml deleted file mode 100644 index 2655da0dfb4..00000000000 --- a/res/drawable/switch_track.xml +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - diff --git a/res/layout/switch_bar.xml b/res/layout/switch_bar.xml index 6b37e4cf4ee..5dbeb559943 100644 --- a/res/layout/switch_bar.xml +++ b/res/layout/switch_bar.xml @@ -31,7 +31,8 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:background="@null" /> + android:background="@null" + android:theme="@style/ThemeOverlay.SwitchBar" /> diff --git a/res/values/themes.xml b/res/values/themes.xml index d54819dea4f..898274f4086 100644 --- a/res/values/themes.xml +++ b/res/values/themes.xml @@ -204,4 +204,10 @@ @android:color/white + + + diff --git a/src/com/android/settings/widget/SwitchBar.java b/src/com/android/settings/widget/SwitchBar.java index d974a9d6290..e24d83fc65e 100644 --- a/src/com/android/settings/widget/SwitchBar.java +++ b/src/com/android/settings/widget/SwitchBar.java @@ -97,9 +97,6 @@ public class SwitchBar extends LinearLayout implements CompoundButton.OnCheckedC } }); - mSwitch.setTrackResource(R.drawable.switch_track); - mSwitch.setThumbResource(R.drawable.switch_inner); - setOnClickListener(this); // Default is hide