Fix Theme.AppCompat.Light.DarkActionBar styling.
The base themes need to propagate appcompat attributes such as
actionBarWidgetTheme back into their framework counterparts to
ensure that the correct styles are applied.
This change specifically fixes one such problem but there will be
others to be resolved later as part of this bug.
Fix visibility of a couple of overridden methods in
ActionBarActivity to match that of the base class.
Bug: 9196417
Change-Id: I0799f22234109b1d6f4ef8c1bb39bc7530054c06
diff --git a/v7/appcompat/res/values-v11/themes_base.xml b/v7/appcompat/res/values-v11/themes_base.xml
index ef83a30..9d1c07e 100644
--- a/v7/appcompat/res/values-v11/themes_base.xml
+++ b/v7/appcompat/res/values-v11/themes_base.xml
@@ -37,6 +37,7 @@
<item name="actionButtonStyle">?android:attr/actionButtonStyle</item>
<item name="dividerVertical">?android:attr/dividerVertical</item>
<item name="dividerHorizontal">?android:attr/dividerHorizontal</item>
+ <item name="actionBarWidgetTheme">@null</item>
<!-- Required for use of support_simple_spinner_dropdown_item.xml -->
<item name="listPreferredItemHeight">?android:attr/listPreferredItemHeight</item>
@@ -56,6 +57,7 @@
<item name="actionButtonStyle">?android:attr/actionButtonStyle</item>
<item name="dividerVertical">?android:attr/dividerVertical</item>
<item name="dividerHorizontal">?android:attr/dividerHorizontal</item>
+ <item name="actionBarWidgetTheme">@null</item>
<!-- Required for use of support_simple_spinner_dropdown_item.xml -->
<item name="listPreferredItemHeight">?android:attr/listPreferredItemHeight</item>
diff --git a/v7/appcompat/res/values-v14/themes_base.xml b/v7/appcompat/res/values-v14/themes_base.xml
index 0acb452..b783085 100644
--- a/v7/appcompat/res/values-v14/themes_base.xml
+++ b/v7/appcompat/res/values-v14/themes_base.xml
@@ -37,6 +37,8 @@
<item name="actionButtonStyle">?android:attr/actionButtonStyle</item>
<item name="dividerVertical">?android:attr/dividerVertical</item>
<item name="dividerHorizontal">?android:attr/dividerHorizontal</item>
+ <item name="actionBarWidgetTheme">@null</item>
+ <item name="android:actionBarWidgetTheme">?attr/actionBarWidgetTheme</item>
<!-- Required for use of support_simple_spinner_dropdown_item.xml -->
<item name="listPreferredItemHeight">?android:attr/listPreferredItemHeight</item>
@@ -57,6 +59,8 @@
<item name="actionButtonStyle">?android:attr/actionButtonStyle</item>
<item name="dividerVertical">?android:attr/dividerVertical</item>
<item name="dividerHorizontal">?android:attr/dividerHorizontal</item>
+ <item name="actionBarWidgetTheme">@null</item>
+ <item name="android:actionBarWidgetTheme">?attr/actionBarWidgetTheme</item>
<!-- Required for use of support_simple_spinner_dropdown_item.xml -->
<item name="listPreferredItemHeight">?android:attr/listPreferredItemHeight</item>
@@ -78,6 +82,8 @@
<item name="actionButtonStyle">?android:attr/actionButtonStyle</item>
<item name="dividerVertical">?android:attr/dividerVertical</item>
<item name="dividerHorizontal">?android:attr/dividerHorizontal</item>
+ <item name="actionBarWidgetTheme">@style/Theme.AppCompat</item>
+ <item name="android:actionBarWidgetTheme">?attr/actionBarWidgetTheme</item>
<!-- Required for use of support_simple_spinner_dropdown_item.xml -->
<item name="listPreferredItemHeight">?android:attr/listPreferredItemHeight</item>
diff --git a/v7/appcompat/src/android/support/v7/app/ActionBarActivity.java b/v7/appcompat/src/android/support/v7/app/ActionBarActivity.java
index b6f1568..3239626 100644
--- a/v7/appcompat/src/android/support/v7/app/ActionBarActivity.java
+++ b/v7/appcompat/src/android/support/v7/app/ActionBarActivity.java
@@ -92,13 +92,13 @@
}
@Override
- public void onStop() {
+ protected void onStop() {
super.onStop();
mImpl.onStop();
}
@Override
- public void onPostResume() {
+ protected void onPostResume() {
super.onPostResume();
mImpl.onPostResume();
}
diff --git a/v7/appcompat/src/android/support/v7/app/ActionBarImplHC.java b/v7/appcompat/src/android/support/v7/app/ActionBarImplHC.java
index cf74f29..fefb9c0 100644
--- a/v7/appcompat/src/android/support/v7/app/ActionBarImplHC.java
+++ b/v7/appcompat/src/android/support/v7/app/ActionBarImplHC.java
@@ -272,6 +272,7 @@
@Override
public Context getThemedContext() {
// v11 doesn't have the actionBarWidgetTheme attr, so just use the Activity
+ // This means DarkActionBar theme does not work on v11.
return mActivity;
}