From 2a77408663206b749fc19171abe3b6f7f039fcf7 Mon Sep 17 00:00:00 2001 From: Jiaquan He Date: Wed, 9 Nov 2016 13:19:40 -0800 Subject: [PATCH] Show the highlight for the wifi toggle switch. To make wifi settings more keyboard friendly, we need to show the highlight for the toggle switch when it has the focus. Bug: 32087448 Change-Id: I4a71ad295f7b2c37a4eb141a6281de6934b072fd --- res/layout/switch_bar.xml | 1 - src/com/android/settings/widget/SwitchBar.java | 1 - 2 files changed, 2 deletions(-) diff --git a/res/layout/switch_bar.xml b/res/layout/switch_bar.xml index 8b69a1d1af2..11d7306fb7b 100644 --- a/res/layout/switch_bar.xml +++ b/res/layout/switch_bar.xml @@ -43,7 +43,6 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:layout_gravity="center_vertical" - android:background="@null" android:theme="@style/ThemeOverlay.SwitchBar.Settings" /> diff --git a/src/com/android/settings/widget/SwitchBar.java b/src/com/android/settings/widget/SwitchBar.java index e998e795ac4..7bf6a835507 100644 --- a/src/com/android/settings/widget/SwitchBar.java +++ b/src/com/android/settings/widget/SwitchBar.java @@ -117,7 +117,6 @@ public class SwitchBar extends LinearLayout implements CompoundButton.OnCheckedC lp = (MarginLayoutParams) mSwitch.getLayoutParams(); lp.setMarginEnd(switchBarMarginEnd); setBackgroundColor(switchBarBackgroundColor); - mSwitch.setBackgroundColor(switchBarBackgroundColor); addOnSwitchChangeListener(new OnSwitchChangeListener() { @Override