Merge "Switch framework Holo references to Quantum.Light"
This commit is contained in:
committed by
Android (Google) Code Review
commit
b325345ef0
@ -468,7 +468,8 @@ class ContextImpl extends Context {
|
||||
outerContext.getApplicationInfo().targetSdkVersion,
|
||||
com.android.internal.R.style.Theme_Dialog,
|
||||
com.android.internal.R.style.Theme_Holo_Dialog,
|
||||
com.android.internal.R.style.Theme_DeviceDefault_Dialog)),
|
||||
com.android.internal.R.style.Theme_DeviceDefault_Dialog,
|
||||
com.android.internal.R.style.Theme_DeviceDefault_Light_Dialog)),
|
||||
ctx.mMainThread.getHandler());
|
||||
}});
|
||||
|
||||
|
@ -135,17 +135,31 @@ public class Resources {
|
||||
sPreloadedDrawables[1] = new LongSparseArray<ConstantState>();
|
||||
}
|
||||
|
||||
/** @hide */
|
||||
/**
|
||||
* Returns the most appropriate default theme for the specified target SDK version.
|
||||
* <ul>
|
||||
* <li>Below API 11: Gingerbread
|
||||
* <li>APIs 11 thru 14: Holo
|
||||
* <li>APIs 14 thru XX: Device default dark
|
||||
* <li>API XX and above: Device default light with dark action bar
|
||||
* </ul>
|
||||
*
|
||||
* @param curTheme The current theme, or 0 if not specified.
|
||||
* @param targetSdkVersion The target SDK version.
|
||||
* @return A theme resource identifier
|
||||
* @hide
|
||||
*/
|
||||
public static int selectDefaultTheme(int curTheme, int targetSdkVersion) {
|
||||
return selectSystemTheme(curTheme, targetSdkVersion,
|
||||
com.android.internal.R.style.Theme,
|
||||
com.android.internal.R.style.Theme_Holo,
|
||||
com.android.internal.R.style.Theme_DeviceDefault);
|
||||
com.android.internal.R.style.Theme_DeviceDefault,
|
||||
com.android.internal.R.style.Theme_DeviceDefault_Light_DarkActionBar);
|
||||
}
|
||||
|
||||
|
||||
/** @hide */
|
||||
public static int selectSystemTheme(int curTheme, int targetSdkVersion,
|
||||
int orig, int holo, int deviceDefault) {
|
||||
public static int selectSystemTheme(int curTheme, int targetSdkVersion, int orig, int holo,
|
||||
int dark, int deviceDefault) {
|
||||
if (curTheme != 0) {
|
||||
return curTheme;
|
||||
}
|
||||
@ -155,9 +169,12 @@ public class Resources {
|
||||
if (targetSdkVersion < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
|
||||
return holo;
|
||||
}
|
||||
if (targetSdkVersion < Build.VERSION_CODES.CUR_DEVELOPMENT) {
|
||||
return dark;
|
||||
}
|
||||
return deviceDefault;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* This exception is thrown by the resource APIs when a requested resource
|
||||
* can not be found.
|
||||
|
@ -647,6 +647,7 @@ public class InputMethodService extends AbstractInputMethodService {
|
||||
getApplicationInfo().targetSdkVersion,
|
||||
android.R.style.Theme_InputMethod,
|
||||
android.R.style.Theme_Holo_InputMethod,
|
||||
android.R.style.Theme_DeviceDefault_InputMethod,
|
||||
android.R.style.Theme_DeviceDefault_InputMethod);
|
||||
super.setTheme(mTheme);
|
||||
super.onCreate();
|
||||
|
@ -174,7 +174,6 @@ public class ActionBarImpl extends ActionBar {
|
||||
}
|
||||
|
||||
private void init(View decor) {
|
||||
mContext = decor.getContext();
|
||||
mOverlayLayout = (ActionBarOverlayLayout) decor.findViewById(
|
||||
com.android.internal.R.id.action_bar_overlay_layout);
|
||||
if (mOverlayLayout != null) {
|
||||
@ -193,6 +192,7 @@ public class ActionBarImpl extends ActionBar {
|
||||
"with a compatible window decor layout");
|
||||
}
|
||||
|
||||
mContext = mActionView.getContext();
|
||||
mActionView.setContextView(mContextView);
|
||||
mContextDisplayMode = mActionView.isSplitActionBar() ?
|
||||
CONTEXT_DISPLAY_SPLIT : CONTEXT_DISPLAY_NORMAL;
|
||||
|
@ -24,7 +24,7 @@ This is an optimized layout for a screen with the Action Bar enabled.
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:splitMotionEvents="false"
|
||||
android:theme="?attr/actionBarTheme">
|
||||
android:theme="?attr/actionBarWidgetTheme">
|
||||
<FrameLayout android:id="@android:id/content"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent" />
|
||||
|
@ -677,8 +677,6 @@
|
||||
<!-- Action bar styles -->
|
||||
<!-- =================== -->
|
||||
<eat-comment />
|
||||
<!-- Theme override for the Action Bar -->
|
||||
<attr name="actionBarTheme" format="reference" />
|
||||
<!-- Default style for tabs within an action bar -->
|
||||
<attr name="actionBarTabStyle" format="reference" />
|
||||
<attr name="actionBarTabBarStyle" format="reference" />
|
||||
|
@ -694,7 +694,7 @@ please see themes_device_defaults.xml.
|
||||
with an inverse color profile. The dark action bar sharply stands out against
|
||||
the light content. -->
|
||||
<style name="Theme.Quantum.Light.DarkActionBar">
|
||||
<item name="actionBarTheme">@style/Theme.Quantum</item>
|
||||
<item name="actionBarWidgetTheme">@style/Theme.Quantum</item>
|
||||
</style>
|
||||
|
||||
<!-- Variant of the quantum (dark) theme with no action bar. -->
|
||||
|
@ -42,7 +42,7 @@
|
||||
<activity
|
||||
android:name=".SettingsActivity"
|
||||
android:label="@string/menu_settings"
|
||||
android:theme="@android:style/Theme.Holo.Light.DialogWhenLarge"
|
||||
android:theme="@android:style/Theme.DeviceDefault.Light.DialogWhenLarge"
|
||||
android:exported="false" />
|
||||
|
||||
<provider
|
||||
|
@ -15,11 +15,11 @@
|
||||
-->
|
||||
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<style name="Theme" parent="@android:style/Theme.Holo.Light">
|
||||
<style name="Theme" parent="@android:style/Theme.DeviceDefault.Light">
|
||||
<item name="android:actionOverflowButtonStyle">@style/DarkerOverflow</item>
|
||||
<item name="android:windowBackground">@*android:drawable/dialog_full_holo_light</item>
|
||||
<item name="android:colorBackgroundCacheHint">@null</item>
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
<item name="android:windowAnimationStyle">@*android:style/Animation.Holo.Dialog</item>
|
||||
<item name="android:windowAnimationStyle">@*android:style/Animation.DeviceDefault.Dialog</item>
|
||||
</style>
|
||||
</resources>
|
||||
|
@ -29,11 +29,11 @@
|
||||
|
||||
<!-- Normally just a redirection, but this is used to make ourselves a
|
||||
dialog on large tablets -->
|
||||
<style name="Theme" parent="@android:style/Theme.Holo.Light">
|
||||
<style name="Theme" parent="@android:style/Theme.DeviceDefault.Light">
|
||||
<item name="android:actionOverflowButtonStyle">@style/DarkerOverflow</item>
|
||||
</style>
|
||||
|
||||
<style name="DarkerOverflow" parent="@android:style/Widget.Holo.Light.ActionButton.Overflow">
|
||||
<style name="DarkerOverflow" parent="@android:style/Widget.DeviceDefault.Light.ActionButton.Overflow">
|
||||
<item name="android:src">@drawable/ic_menu_overflow</item>
|
||||
</style>
|
||||
|
||||
|
@ -68,7 +68,7 @@
|
||||
<item name="android:textSize">@dimen/widget_big_font_size</item>
|
||||
</style>
|
||||
|
||||
<style name="Widget.TransportControl.SeekBar" parent="@android:style/Widget.Holo.SeekBar">
|
||||
<style name="Widget.TransportControl.SeekBar" parent="@android:style/Widget.DeviceDefault.Light.SeekBar">
|
||||
<item name="android:indeterminateOnly">false</item>
|
||||
<item name="android:progressDrawable">@drawable/scrubber_progress_horizontal_holo_light</item>
|
||||
<item name="android:indeterminateDrawable">@drawable/scrubber_progress_horizontal_holo_light</item>
|
||||
|
@ -23,7 +23,7 @@
|
||||
<application android:label="@string/app_name" android:icon="@drawable/app_icon">
|
||||
<activity android:name=".KeyguardTestActivity"
|
||||
android:label="@string/app_name"
|
||||
android:theme="@android:style/Theme.Holo">
|
||||
android:theme="@android:style/Theme.DeviceDefault.Light">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
|
@ -61,7 +61,7 @@
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:indeterminate="true"
|
||||
style="@android:style/Widget.Holo.ProgressBar.Horizontal">
|
||||
style="@android:style/Widget.DeviceDefault.Light.ProgressBar.Horizontal">
|
||||
</ProgressBar>
|
||||
|
||||
</LinearLayout>
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
<resources>
|
||||
|
||||
<style name="PrintJobConfigActivityTheme" parent="@android:style/Theme.Holo.Light.NoActionBar">
|
||||
<style name="PrintJobConfigActivityTheme" parent="@android:style/Theme.DeviceDefault.Light.NoActionBar">
|
||||
<item name="android:windowBackground">@android:color/transparent</item>
|
||||
<item name="android:windowSoftInputMode">stateAlwaysHidden|adjustResize</item>
|
||||
<item name="android:windowIsTranslucent">true</item>
|
||||
@ -25,11 +25,11 @@
|
||||
<item name="android:windowIsFloating">true</item>
|
||||
</style>
|
||||
|
||||
<style name="SelectPrinterActivityTheme" parent="@android:style/Theme.Holo.Light">
|
||||
<style name="SelectPrinterActivityTheme" parent="@android:style/Theme.DeviceDefault.Light">
|
||||
<item name="android:actionBarStyle">@style/SelectPrinterActivityActionBarStyle</item>
|
||||
</style>
|
||||
|
||||
<style name="SelectPrinterActivityActionBarStyle" parent="@android:style/Widget.Holo.ActionBar">
|
||||
<style name="SelectPrinterActivityActionBarStyle" parent="@android:style/Widget.DeviceDefault.Light.ActionBar">
|
||||
<item name="android:displayOptions">showTitle</item>
|
||||
</style>
|
||||
|
||||
|
@ -83,7 +83,7 @@
|
||||
|
||||
<activity
|
||||
android:name=".BugreportWarningActivity"
|
||||
android:theme="@*android:style/Theme.Holo.Dialog.Alert"
|
||||
android:theme="@*android:style/Theme.DeviceDefault.Light.Dialog.Alert"
|
||||
android:finishOnCloseSystemDialogs="true"
|
||||
android:excludeFromRecents="true"
|
||||
android:exported="false" />
|
||||
|
@ -157,7 +157,7 @@
|
||||
<activity android:name=".usb.UsbConfirmActivity"
|
||||
android:exported="true"
|
||||
android:permission="android.permission.MANAGE_USB"
|
||||
android:theme="@*android:style/Theme.Holo.Dialog.Alert"
|
||||
android:theme="@*android:style/Theme.DeviceDefault.Light.Dialog.Alert"
|
||||
android:finishOnCloseSystemDialogs="true"
|
||||
android:excludeFromRecents="true">
|
||||
</activity>
|
||||
@ -166,7 +166,7 @@
|
||||
<activity android:name=".usb.UsbPermissionActivity"
|
||||
android:exported="true"
|
||||
android:permission="android.permission.MANAGE_USB"
|
||||
android:theme="@*android:style/Theme.Holo.Dialog.Alert"
|
||||
android:theme="@*android:style/Theme.DeviceDefault.Light.Dialog.Alert"
|
||||
android:finishOnCloseSystemDialogs="true"
|
||||
android:excludeFromRecents="true">
|
||||
</activity>
|
||||
@ -175,7 +175,7 @@
|
||||
<activity android:name=".usb.UsbResolverActivity"
|
||||
android:exported="true"
|
||||
android:permission="android.permission.MANAGE_USB"
|
||||
android:theme="@*android:style/Theme.Holo.Dialog.Alert"
|
||||
android:theme="@*android:style/Theme.DeviceDefault.Light.Dialog.Alert"
|
||||
android:finishOnCloseSystemDialogs="true"
|
||||
android:excludeFromRecents="true">
|
||||
</activity>
|
||||
@ -184,7 +184,7 @@
|
||||
<activity android:name=".usb.UsbAccessoryUriActivity"
|
||||
android:exported="true"
|
||||
android:permission="android.permission.MANAGE_USB"
|
||||
android:theme="@*android:style/Theme.Holo.Dialog.Alert"
|
||||
android:theme="@*android:style/Theme.DeviceDefault.Light.Dialog.Alert"
|
||||
android:finishOnCloseSystemDialogs="true"
|
||||
android:excludeFromRecents="true">
|
||||
</activity>
|
||||
@ -192,7 +192,7 @@
|
||||
<!-- started from UsbDebuggingManager -->
|
||||
<activity android:name=".usb.UsbDebuggingActivity"
|
||||
android:permission="android.permission.MANAGE_USB"
|
||||
android:theme="@*android:style/Theme.Holo.Dialog.Alert"
|
||||
android:theme="@*android:style/Theme.DeviceDefault.Light.Dialog.Alert"
|
||||
android:finishOnCloseSystemDialogs="true"
|
||||
android:excludeFromRecents="true">
|
||||
</activity>
|
||||
@ -202,7 +202,7 @@
|
||||
android:name=".net.NetworkOverLimitActivity"
|
||||
android:exported="true"
|
||||
android:permission="android.permission.MANAGE_NETWORK_POLICY"
|
||||
android:theme="@android:style/Theme.Holo.Panel"
|
||||
android:theme="@android:style/Theme.DeviceDefault.Light.Panel"
|
||||
android:finishOnCloseSystemDialogs="true"
|
||||
android:launchMode="singleTop"
|
||||
android:taskAffinity="com.android.systemui.net"
|
||||
|
@ -16,12 +16,12 @@
|
||||
|
||||
<resources xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
|
||||
<style name="RecentsStyle" parent="@android:style/Theme.Holo.Wallpaper.NoTitleBar">
|
||||
<style name="RecentsStyle" parent="@android:style/Theme.DeviceDefault.Light.Wallpaper.NoTitleBar">
|
||||
<item name="android:windowAnimationStyle">@style/Animation.RecentsActivity</item>
|
||||
</style>
|
||||
|
||||
<!-- Alternate Recents theme -->
|
||||
<style name="RecentsTheme" parent="@android:style/Theme.Holo.Wallpaper.NoTitleBar">
|
||||
<style name="RecentsTheme" parent="@android:style/Theme.DeviceDefault.Light.Wallpaper.NoTitleBar">
|
||||
<item name="android:windowTranslucentStatus">true</item>
|
||||
<item name="android:windowTranslucentNavigation">true</item>
|
||||
<item name="android:windowAnimationStyle">@style/Animation.RecentsActivity</item>
|
||||
|
@ -83,22 +83,7 @@ public class ToggleSlider extends RelativeLayout
|
||||
}
|
||||
|
||||
public void onCheckedChanged(CompoundButton toggle, boolean checked) {
|
||||
Drawable thumb;
|
||||
Drawable slider;
|
||||
final Resources res = getContext().getResources();
|
||||
if (checked) {
|
||||
thumb = res.getDrawable(
|
||||
com.android.internal.R.drawable.scrubber_control_disabled_holo);
|
||||
slider = res.getDrawable(
|
||||
R.drawable.status_bar_settings_slider_disabled);
|
||||
} else {
|
||||
thumb = res.getDrawable(
|
||||
com.android.internal.R.drawable.scrubber_control_selector_holo);
|
||||
slider = res.getDrawable(
|
||||
com.android.internal.R.drawable.scrubber_progress_horizontal_holo_dark);
|
||||
}
|
||||
mSlider.setThumb(thumb);
|
||||
mSlider.setProgressDrawable(slider);
|
||||
mSlider.setEnabled(checked);
|
||||
|
||||
if (mListener != null) {
|
||||
mListener.onChanged(this, mTracking, checked, mSlider.getProgress());
|
||||
|
@ -4,7 +4,7 @@
|
||||
<application android:label="VpnDialogs"
|
||||
android:allowBackup="false" >
|
||||
<activity android:name=".ConfirmDialog"
|
||||
android:theme="@*android:style/Theme.Holo.Dialog.Alert">
|
||||
android:theme="@*android:style/Theme.DeviceDefault.Light.Dialog.Alert">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.DEFAULT"/>
|
||||
@ -12,7 +12,7 @@
|
||||
</activity>
|
||||
|
||||
<activity android:name=".ManageDialog"
|
||||
android:theme="@*android:style/Theme.Holo.Dialog.Alert"
|
||||
android:theme="@*android:style/Theme.DeviceDefault.Light.Dialog.Alert"
|
||||
android:noHistory="true">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
|
@ -28,7 +28,7 @@
|
||||
android:layout_height="match_parent" />
|
||||
<ProgressBar
|
||||
android:id="@+id/loading"
|
||||
style="@android:style/Widget.Holo.ProgressBar.Large"
|
||||
style="@android:style/Widget.DeviceDefault.Light.ProgressBar.Large"
|
||||
android:visibility="invisible"
|
||||
android:layout_width="wrap_content"
|
||||
android:layout_height="wrap_content"
|
||||
|
@ -15,13 +15,13 @@
|
||||
-->
|
||||
|
||||
<resources>
|
||||
<style name="Theme.WallpaperCropper" parent="@android:style/Theme.Holo">
|
||||
<style name="Theme.WallpaperCropper" parent="@android:style/Theme.DeviceDefault.Light">
|
||||
<item name="android:actionBarStyle">@style/WallpaperCropperActionBar</item>
|
||||
<item name="android:windowFullscreen">true</item>
|
||||
<item name="android:windowActionBarOverlay">true</item>
|
||||
</style>
|
||||
|
||||
<style name="WallpaperCropperActionBar" parent="android:style/Widget.Holo.ActionBar">
|
||||
<style name="WallpaperCropperActionBar" parent="android:style/Widget.DeviceDefault.Light.ActionBar">
|
||||
<item name="android:displayOptions">showCustom</item>
|
||||
<item name="android:background">#88000000</item>
|
||||
</style>
|
||||
|
@ -269,7 +269,7 @@ public final class SystemServer {
|
||||
private void createSystemContext() {
|
||||
ActivityThread activityThread = ActivityThread.systemMain();
|
||||
mSystemContext = activityThread.getSystemContext();
|
||||
mSystemContext.setTheme(android.R.style.Theme_Holo);
|
||||
mSystemContext.setTheme(android.R.style.Theme_DeviceDefault_Light_DarkActionBar);
|
||||
}
|
||||
|
||||
private void startBootstrapServices() {
|
||||
|
Reference in New Issue
Block a user