Bug 1067429 - Create GeckoAppBase as the parent for Gecko.App. r=lucasr
authorBrian Nicholson <bnicholson@mozilla.com>
Mon, 22 Sep 2014 11:46:33 -0700
changeset 206551 7b68abc42dbc33d6e98364bcbc9a14434b81b3ad
parent 206550 008e268fe555662a9eff5c7f1065853dc3ac5165
child 206552 6ae35824e143bec9b99bc230e972b3baad098719
push id1
push userroot
push dateMon, 20 Oct 2014 17:29:22 +0000
reviewerslucasr
bugs1067429
milestone35.0a1
Bug 1067429 - Create GeckoAppBase as the parent for Gecko.App. r=lucasr
mobile/android/base/resources/values-v11/themes.xml
mobile/android/base/resources/values/themes.xml
--- a/mobile/android/base/resources/values-v11/themes.xml
+++ b/mobile/android/base/resources/values-v11/themes.xml
@@ -26,41 +26,28 @@
 
     <style name="GeckoPreferencesBase" parent="GeckoBase">
         <item name="android:windowActionBar">true</item>
         <item name="android:windowNoTitle">false</item>
         <item name="android:actionBarStyle">@style/ActionBar.GeckoPreferences</item>
     </style>
 
     <!--
-        Activity based themes.
+        Activity based themes for API 11+. This theme completely replaces
+        GeckoAppBase from res/values/themes.xml on API 11+ devices.
     -->
-    <style name="Gecko.App">
+    <style name="GeckoAppBase" parent="Gecko">
         <item name="android:actionButtonStyle">@style/GeckoActionBar.Button</item>
         <item name="android:actionModeCopyDrawable">@drawable/ab_copy</item>
         <item name="android:actionModeCutDrawable">@drawable/ab_cut</item>
         <item name="android:actionModePasteDrawable">@drawable/ab_paste</item>
         <item name="android:actionModeSelectAllDrawable">@drawable/ab_select_all</item>
         <item name="android:actionModeStyle">@style/GeckoActionBar</item>
-        <item name="android:gridViewStyle">@style/Widget.GridView</item>
         <item name="android:listViewStyle">@style/Widget.ListView</item>
         <item name="android:panelBackground">@drawable/menu_panel_bg</item>
         <item name="android:spinnerDropDownItemStyle">@style/Widget.DropDownItem.Spinner</item>
         <item name="android:spinnerItemStyle">@style/Widget.TextView.SpinnerItem</item>
-        <item name="android:spinnerStyle">@style/Widget.Spinner</item>
-        <item name="android:windowBackground">@android:color/white</item>
-        <item name="bookmarksListViewStyle">@style/Widget.BookmarksListView</item>
-        <item name="floatingHintEditTextStyle">@style/FloatingHintEditText</item>
-        <item name="geckoMenuListViewStyle">@style/Widget.GeckoMenuListView</item>
-        <item name="homeListViewStyle">@style/Widget.HomeListView</item>
-        <item name="menuItemActionBarStyle">@style/Widget.MenuItemActionBar</item>
-        <item name="menuItemActionModeStyle">@style/GeckoActionBar.Button</item>
         <item name="menuItemActionViewStyle">@style/Widget.MenuItemActionView</item>
         <item name="menuItemDefaultStyle">@style/Widget.MenuItemDefault</item>
         <item name="menuItemSecondaryActionBarStyle">@style/Widget.MenuItemSecondaryActionBar</item>
-        <item name="menuItemShareActionButtonStyle">@style/Widget.MenuItemSecondaryActionBar</item>
-        <item name="panelGridViewStyle">@style/Widget.PanelGridView</item>
-        <item name="topSitesGridItemViewStyle">@style/Widget.TopSitesGridItemView</item>
-        <item name="topSitesGridViewStyle">@style/Widget.TopSitesGridView</item>
-        <item name="topSitesThumbnailViewStyle">@style/Widget.TopSitesThumbnailView</item>
     </style>
 
 </resources>
--- a/mobile/android/base/resources/values/themes.xml
+++ b/mobile/android/base/resources/values/themes.xml
@@ -66,33 +66,38 @@
         <item name="android:textAppearanceSmallInverse">@style/TextAppearance.Small.Inverse</item>
     </style>
 
     <style name="Gecko.Dialog" parent="GeckoDialogBase"/>
 
     <style name="Gecko.TitleDialog" parent="GeckoTitleDialogBase"/>
 
     <!--
-        Activity based themes.
+        Activity based themes, dependent on API level. This theme is replaced
+        by GeckoAppBase from res/values-vXX/themes.xml on newer devices.
     -->
-    <style name="Gecko.App">
+    <style name="GeckoAppBase" parent="Gecko">
         <item name="android:buttonStyle">@style/Widget.Button</item>
         <item name="android:dropDownItemStyle">@style/Widget.DropDownItem</item>
         <item name="android:editTextStyle">@style/Widget.EditText</item>
+        <item name="android:textViewStyle">@style/Widget.TextView</item>
+        <item name="menuItemDefaultStyle">@style/Widget.MenuItemDefault</item>
+    </style>
+
+    <!-- All customizations that are NOT specific to a particular API-level can go here. -->
+    <style name="Gecko.App" parent="GeckoAppBase">
         <item name="android:gridViewStyle">@style/Widget.GridView</item>
         <item name="android:spinnerStyle">@style/Widget.Spinner</item>
-        <item name="android:textViewStyle">@style/Widget.TextView</item>
         <item name="android:windowBackground">@android:color/white</item>
         <item name="bookmarksListViewStyle">@style/Widget.BookmarksListView</item>
         <item name="floatingHintEditTextStyle">@style/FloatingHintEditText</item>
         <item name="geckoMenuListViewStyle">@style/Widget.GeckoMenuListView</item>
         <item name="homeListViewStyle">@style/Widget.HomeListView</item>
         <item name="menuItemActionBarStyle">@style/Widget.MenuItemActionBar</item>
         <item name="menuItemActionModeStyle">@style/GeckoActionBar.Button</item>
-        <item name="menuItemDefaultStyle">@style/Widget.MenuItemDefault</item>
         <item name="menuItemShareActionButtonStyle">@style/Widget.MenuItemSecondaryActionBar</item>
         <item name="panelGridViewStyle">@style/Widget.PanelGridView</item>
         <item name="topSitesGridItemViewStyle">@style/Widget.TopSitesGridItemView</item>
         <item name="topSitesGridViewStyle">@style/Widget.TopSitesGridView</item>
         <item name="topSitesThumbnailViewStyle">@style/Widget.TopSitesThumbnailView</item>
     </style>
 
     <style name="Gecko.Preferences" parent="GeckoPreferencesBase">