1 /* 2 * Copyright (C) 2012 The Android Open Source Project 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 package com.android.settings.wifi; 17 18 import com.android.settings.ButtonBarHandler; 19 20 import android.content.res.Resources; 21 22 public class WifiSetupActivity extends WifiPickerActivity implements ButtonBarHandler { 23 // Extra containing the resource name of the theme to be used 24 private static final String EXTRA_THEME = "theme"; 25 private static final String THEME_HOLO = "holo"; 26 private static final String THEME_HOLO_LIGHT = "holo_light"; 27 28 // Style resources containing theme settings 29 private static final String RESOURCE_THEME_DARK = "SetupWizardWifiTheme"; 30 private static final String RESOURCE_THEME_LIGHT = "SetupWizardWifiTheme.Light"; 31 32 @Override 33 protected void onApplyThemeResource(Resources.Theme theme, int resid, boolean first) { 34 String themeName = getIntent().getStringExtra(EXTRA_THEME); 35 if (themeName != null && themeName.equalsIgnoreCase(THEME_HOLO_LIGHT)) { 36 resid = getResources().getIdentifier(RESOURCE_THEME_LIGHT, "style", 37 getPackageName()); 38 } 39 super.onApplyThemeResource(theme, resid, first); 40 } 41 } 42