diff options
author | Russell Brenner <russellbrenner@google.com> | 2013-08-22 11:22:35 -0700 |
---|---|---|
committer | Russell Brenner <russellbrenner@google.com> | 2013-08-28 09:44:36 -0700 |
commit | e8a80b5db3418ee9824e457420c3536f0eb71139 (patch) | |
tree | d0d90e05c5d5ca73dc839e9c19cfd7d81bd0121e /src/com/android/settings | |
parent | 8df4caf168a793d7f17b31ba50e37479b0404022 (diff) | |
download | packages_apps_Settings-e8a80b5db3418ee9824e457420c3536f0eb71139.tar.gz packages_apps_Settings-e8a80b5db3418ee9824e457420c3536f0eb71139.tar.bz2 packages_apps_Settings-e8a80b5db3418ee9824e457420c3536f0eb71139.zip |
Support Holo Light theme for wifi during setup
Adds programmatic support for holo light theme, activated by setting
EXTRA_THEME to "holo_light". Light-themed graphics are still pending.
Bug: 10407819
Change-Id: I81b6bf3fdf7ca3ee72b0f921b8adf6d858415887
Diffstat (limited to 'src/com/android/settings')
-rw-r--r-- | src/com/android/settings/wifi/WifiDialog.java | 2 | ||||
-rw-r--r-- | src/com/android/settings/wifi/WifiSetupActivity.java | 22 |
2 files changed, 21 insertions, 3 deletions
diff --git a/src/com/android/settings/wifi/WifiDialog.java b/src/com/android/settings/wifi/WifiDialog.java index 82b0cc618..f1720c1c7 100644 --- a/src/com/android/settings/wifi/WifiDialog.java +++ b/src/com/android/settings/wifi/WifiDialog.java @@ -38,7 +38,7 @@ class WifiDialog extends AlertDialog implements WifiConfigUiBase { public WifiDialog(Context context, DialogInterface.OnClickListener listener, AccessPoint accessPoint, boolean edit) { - super(context, R.style.Theme_WifiDialog); + super(context); mEdit = edit; mListener = listener; mAccessPoint = accessPoint; diff --git a/src/com/android/settings/wifi/WifiSetupActivity.java b/src/com/android/settings/wifi/WifiSetupActivity.java index 841595441..1739750d7 100644 --- a/src/com/android/settings/wifi/WifiSetupActivity.java +++ b/src/com/android/settings/wifi/WifiSetupActivity.java @@ -17,7 +17,25 @@ package com.android.settings.wifi; import com.android.settings.ButtonBarHandler; -// dummy class for setup wizard theme +import android.content.res.Resources; + public class WifiSetupActivity extends WifiPickerActivity implements ButtonBarHandler { + // Extra containing the resource name of the theme to be used + private static final String EXTRA_THEME = "theme"; + private static final String THEME_HOLO = "holo"; + private static final String THEME_HOLO_LIGHT = "holo_light"; + + // Style resources containing theme settings + private static final String RESOURCE_THEME_DARK = "SetupWizardWifiTheme"; + private static final String RESOURCE_THEME_LIGHT = "SetupWizardWifiTheme.Light"; -}
\ No newline at end of file + @Override + protected void onApplyThemeResource(Resources.Theme theme, int resid, boolean first) { + String themeName = getIntent().getStringExtra(EXTRA_THEME); + if (themeName != null && themeName.equalsIgnoreCase(THEME_HOLO_LIGHT)) { + resid = getResources().getIdentifier(RESOURCE_THEME_LIGHT, "style", + getPackageName()); + } + super.onApplyThemeResource(theme, resid, first); + } +} |