I've created a ActionBar Style Using the tool ActionBar Style Generator ( http://ift.tt/1e8MJyR );I selected appcombat at the style compatibility selection list, because I need my app to be compatible with Android 2.3 devices; but when I downloaded and implemented the theme,the styles are only shown on my Android 2.3 emulated device; in older devices it only shows the deafault ones. This is the code:
/values/styles.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Iedecap" parent="@style/Theme.AppCompat.Light.DarkActionBar">
<item name="actionBarItemBackground">@drawable/selectable_background_iedecap</item>
<item name="popupMenuStyle">@style/PopupMenu.Iedecap</item>
<item name="dropDownListViewStyle">@style/DropDownListView.Iedecap</item>
<item name="actionBarTabStyle">@style/ActionBarTabStyle.Iedecap</item>
<item name="actionDropDownStyle">@style/DropDownNav.Iedecap</item>
<item name="actionBarStyle">@style/ActionBar.Solid.Iedecap</item>
<item name="actionModeBackground">@drawable/cab_background_top_iedecap</item>
<item name="actionModeSplitBackground">@drawable/cab_background_bottom_iedecap</item>
<item name="actionModeCloseButtonStyle">@style/ActionButton.CloseMode.Iedecap</item>
<!-- Light.DarkActionBar specific -->
<item name="actionBarWidgetTheme">@style/Theme.Iedecap.Widget</item>
</style>
<style name="ActionBar.Solid.Iedecap" parent="@style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<item name="background">@drawable/ab_solid_iedecap</item>
<item name="backgroundStacked">@drawable/ab_stacked_solid_iedecap</item>
<item name="backgroundSplit">@drawable/ab_bottom_solid_iedecap</item>
<item name="progressBarStyle">@style/ProgressBar.Iedecap</item>
</style>
<style name="ActionBar.Transparent.Iedecap" parent="@style/Widget.AppCompat.ActionBar">
<item name="background">@drawable/ab_transparent_iedecap</item>
<item name="progressBarStyle">@style/ProgressBar.Iedecap</item>
</style>
<style name="PopupMenu.Iedecap" parent="@style/Widget.AppCompat.PopupMenu">
<item name="android:popupBackground">@drawable/menu_dropdown_panel_iedecap</item>
</style>
<style name="DropDownListView.Iedecap" parent="@style/Widget.AppCompat.ListView.DropDown">
<item name="android:listSelector">@drawable/selectable_background_iedecap</item>
</style>
<style name="ActionBarTabStyle.Iedecap" parent="@style/Widget.AppCompat.ActionBar.TabView">
<item name="android:background">@drawable/tab_indicator_ab_iedecap</item>
</style>
<style name="DropDownNav.Iedecap" parent="@style/Widget.AppCompat.Spinner.DropDown.ActionBar">
<item name="android:background">@drawable/spinner_background_ab_iedecap</item>
<item name="android:popupBackground">@drawable/menu_dropdown_panel_iedecap</item>
<item name="android:dropDownSelector">@drawable/selectable_background_iedecap</item>
</style>
<style name="ProgressBar.Iedecap" parent="@style/Widget.AppCompat.ProgressBar.Horizontal">
<item name="android:progressDrawable">@drawable/progress_horizontal_iedecap</item>
</style>
<style name="ActionButton.CloseMode.Iedecap" parent="@style/Widget.AppCompat.ActionButton.CloseMode">
<item name="android:background">@drawable/btn_cab_done_iedecap</item>
</style>
<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style name="Theme.Iedecap.Widget" parent="@style/Theme.AppCompat">
<item name="popupMenuStyle">@style/PopupMenu.Iedecap</item>
<item name="dropDownListViewStyle">@style/DropDownListView.Iedecap</item>
</style>
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://ift.tt/nIICcg"
package="com.hipano.idecapmovil" >
<application
android:allowBackup="true"
android:icon="@drawable/ic_launcher"
android:label="@string/app_name"
android:theme="@style/Theme.Iedecap" >
<activity
android:name=".MainActivity"
android:label="@string/app_name" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".LoginActivity"
android:label="@string/app_name" >
</activity>
<activity
android:name=".Register"
android:label="@string/app_name" >
</activity>
<activity
android:name=".DashboardActivity"
android:label="@string/title_activity_dashboard" >
</activity>
</application>
</manifest>
I think this is pretty strange since my entire code was generated by an automatic tool. Thanks in advance
No comments:
Post a Comment