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
This commit is contained in:
@@ -17,7 +17,25 @@ package com.android.settings.wifi;
|
||||
|
||||
import com.android.settings.ButtonBarHandler;
|
||||
|
||||
// dummy class for setup wizard theme
|
||||
public class WifiSetupActivity extends WifiPickerActivity implements ButtonBarHandler {
|
||||
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";
|
||||
|
||||
@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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user