Merge "Fix bug #13140648 Settings needs to support the new Quantum Paper theme"

This commit is contained in:
Fabrice Di Meglio
2014-02-25 22:31:06 +00:00
committed by Android (Google) Code Review
3 changed files with 7 additions and 10 deletions

View File

@@ -15,7 +15,8 @@
--> -->
<resources> <resources>
<color name="background_drawer">#ff777777</color> <color name="background_drawer">@android:color/white</color>
<color name="background_drawer_icon">#ffcccccc</color>
<color name="black">#000</color> <color name="black">#000</color>
<color name="red">#F00</color> <color name="red">#F00</color>

View File

@@ -62,8 +62,7 @@
android:id="@+id/wireless_settings" android:id="@+id/wireless_settings"
android:title="@string/radio_controls_title" android:title="@string/radio_controls_title"
android:breadCrumbTitle="@string/wireless_networks_settings_title" android:breadCrumbTitle="@string/wireless_networks_settings_title"
android:fragment="com.android.settings.WirelessSettings" android:fragment="com.android.settings.WirelessSettings" />
android:icon="@drawable/empty_icon" />
<!-- DEVICE --> <!-- DEVICE -->
<header android:id="@+id/device_section" <header android:id="@+id/device_section"

View File

@@ -521,13 +521,7 @@ public class SettingsActivity extends Activity
DevicePolicyManager dpm = DevicePolicyManager dpm =
(DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE); (DevicePolicyManager) getSystemService(Context.DEVICE_POLICY_SERVICE);
// As the Settings Theme is now Holo Light, the primary text color is "Black" ... but mHeaderAdapter= new HeaderAdapter(this, getHeaders(), mAuthenticatorHelper, dpm);
// we want the text color of the Drawer items to be "White", so use the inverse Theme (Holo)
// for the Header adapter (and thus making the TextView appearance to have a white color.
Context headersContext = new ContextThemeWrapper(this,
com.android.internal.R.style.Theme_Holo);
mHeaderAdapter= new HeaderAdapter(headersContext, getHeaders(), mAuthenticatorHelper, dpm);
mDevelopmentPreferences = getSharedPreferences(DevelopmentSettings.PREF_FILE, mDevelopmentPreferences = getSharedPreferences(DevelopmentSettings.PREF_FILE,
Context.MODE_PRIVATE); Context.MODE_PRIVATE);
@@ -1543,6 +1537,9 @@ public class SettingsActivity extends Activity
view.findViewById(com.android.internal.R.id.summary); view.findViewById(com.android.internal.R.id.summary);
break; break;
} }
if (holder.mIcon != null) {
holder.mIcon.setBackgroundResource(R.color.background_drawer_icon);
}
view.setTag(holder); view.setTag(holder);
} else { } else {
view = convertView; view = convertView;