Make all the Settings Switches appear again

- use the ActionBar Theme context when creating the Switch for
getting the correct Theming

Change-Id: Ic3701c53662b0f245c7149b119de8bb5cbaae232
This commit is contained in:
Fabrice Di Meglio
2014-04-18 16:38:26 -07:00
parent 255743990c
commit ede1435518
8 changed files with 10 additions and 13 deletions

View File

@@ -117,7 +117,7 @@ public final class BluetoothSettings extends DeviceListPreferenceFragment implem
final Activity activity = getActivity();
final int padding = activity.getResources().getDimensionPixelSize(
R.dimen.action_bar_switch_padding);
mSwitch = new Switch(activity);
mSwitch = new Switch(activity.getActionBar().getThemedContext());
mSwitch.setPaddingRelative(0, 0, padding, 0);
mBluetoothEnabler = new BluetoothEnabler(activity, mSwitch);