So I used the action bar style generator to create a theme with style compatibility mode set to AppCompat. I downloaded the ZIP file and copy and pasted all the files inside my folder but the theme isn't showing up when emulator is ran.
The styles_actionstyle.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Actionstyle" parent="#style/Theme.AppCompat.Light.DarkActionBar">
<item name="actionBarItemBackground">#drawable/selectable_background_actionstyle</item >
<item name="popupMenuStyle">#style/PopupMenu.Actionstyle</item>
<item name="dropDownListViewStyle">#style/DropDownListView.Actionstyle</item>
<item name="actionBarTabStyle">#style/ActionBarTabStyle.Actionstyle</item>
<item name="actionDropDownStyle">#style/DropDownNav.Actionstyle</item>
<item name="actionBarStyle">#style/ActionBar.Solid.Actionstyle</item>
<item name="actionModeBackground">#drawable/cab_background_top_actionstyle</item>
<item name="actionModeSplitBackground">#drawable/cab_background_bottom_actionstyle</item>
<item name="actionModeCloseButtonStyle">#style/ActionButton.CloseMode.Actionstyle</item>
<!-- Light.DarkActionBar specific -->
<item name="actionBarWidgetTheme">#style/Theme.Actionstyle.Widget</item>
</style>
<style name="ActionBar.Solid.Actionstyle" parent="#style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<item name="background">#drawable/ab_solid_actionstyle</item>
<item name="backgroundStacked">#drawable/ab_stacked_solid_actionstyle</item>
<item name="backgroundSplit">#drawable/ab_bottom_solid_actionstyle</item>
<item name="progressBarStyle">#style/ProgressBar.Actionstyle</item>
</style>
<style name="ActionBar.Transparent.Actionstyle" parent="#style/Widget.AppCompat.ActionBar">
<item name="background">#drawable/ab_transparent_actionstyle</item>
<item name="progressBarStyle">#style/ProgressBar.Actionstyle</item>
</style>
<style name="PopupMenu.Actionstyle" parent="#style/Widget.AppCompat.PopupMenu">
<item name="android:popupBackground">#drawable/menu_dropdown_panel_actionstyle</item>
</style>
<style name="DropDownListView.Actionstyle" parent="#style/Widget.AppCompat.ListView.DropDown">
<item name="android:listSelector">#drawable/selectable_background_actionstyle</item>
</style>
<style name="ActionBarTabStyle.Actionstyle" parent="#style/Widget.AppCompat.ActionBar.TabView">
<item name="android:background">#drawable/tab_indicator_ab_actionstyle</item>
</style>
<style name="DropDownNav.Actionstyle" parent="#style/Widget.AppCompat.Spinner.DropDown.ActionBar">
<item name="android:background">#drawable/spinner_background_ab_actionstyle</item>
<item name="android:popupBackground">#drawable/menu_dropdown_panel_actionstyle</item>
<item name="android:dropDownSelector">#drawable/selectable_background_actionstyle</item>
</style>
<style name="ProgressBar.Actionstyle" parent="#style/Widget.AppCompat.ProgressBar.Horizontal">
<item name="android:progressDrawable">#drawable/progress_horizontal_actionstyle</item>
</style>
<style name="ActionButton.CloseMode.Actionstyle" parent="#style/Widget.AppCompat.ActionButton.CloseMode">
<item name="android:background">#drawable/btn_cab_done_actionstyle</item>
</style>
<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style name="Theme.Actionstyle.Widget" parent="#style/Theme.AppCompat">
<item name="popupMenuStyle">#style/PopupMenu.Actionstyle</item>
<item name="dropDownListViewStyle">#style/DropDownListView.Actionstyle</item>
</style>
</resources>
The V14 version:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.Actionstyle" parent="#style/Theme.AppCompat.Light.DarkActionBar">
<item name="android:actionBarItemBackground">#drawable/selectable_background_actionstyle</item>
<item name="android:popupMenuStyle">#style/PopupMenu.Actionstyle</item>
<item name="android:dropDownListViewStyle">#style/DropDownListView.Actionstyle</item>
<item name="android:actionBarTabStyle">#style/ActionBarTabStyle.Actionstyle</item>
<item name="android:actionDropDownStyle">#style/DropDownNav.Actionstyle</item>
<item name="android:actionBarStyle">#style/ActionBar.Solid.Actionstyle</item>
<item name="android:actionModeBackground">#drawable/cab_background_top_actionstyle</item>
<item name="android:actionModeSplitBackground">#drawable/cab_background_bottom_actionstyle</item>
<item name="android:actionModeCloseButtonStyle">#style/ActionButton.CloseMode.Actionstyle</item>
<!-- Light.DarkActionBar specific -->
<item name="android:actionBarWidgetTheme">#style/Theme.Actionstyle.Widget</item>
</style>
<style name="ActionBar.Solid.Actionstyle" parent="#style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<item name="android:background">#drawable/ab_background_textured_actionstyle</item>
<item name="android:backgroundStacked">#drawable/ab_stacked_solid_actionstyle</item>
<item name="android:backgroundSplit">#drawable/ab_background_textured_actionstyle</item>
<item name="android:progressBarStyle">#style/ProgressBar.Actionstyle</item>
</style>
<style name="ActionBar.Transparent.Actionstyle" parent="#style/Widget.AppCompat.ActionBar">
<item name="android:background">#drawable/ab_transparent_actionstyle</item>
<item name="android:progressBarStyle">#style/ProgressBar.Actionstyle</item>
</style>
<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style name="Theme.Actionstyle.Widget" parent="#style/Theme.AppCompat">
<item name="android:popupMenuStyle">#style/PopupMenu.Actionstyle</item>
<item name="android:dropDownListViewStyle">#style/DropDownListView.Actionstyle</item>
</style>
</resources>
The manifests file:
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.mycompany.blooddonation2" >
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/Theme.Actionstyle" >
<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>
</application>
</manifest>
Related
I finished Android Action Bar Style Generator and downloaded the zip from there.
I copied and pasted all the folder in res, then changed the theme to let my app use the theme I edited. but The result is nothing changed!!!!
I am still beginner here. I am still not sure if there are other thing to deal with about changing Theme.
style_example.xml in folder values (created by the generator)
<style name="Theme.Example" parent="#style/Theme.AppCompat.Light.DarkActionBar">
<item name="actionBarItemBackground">#drawable/selectable_background_example</item>
<item name="popupMenuStyle">#style/PopupMenu.Example</item>
<item name="dropDownListViewStyle">#style/DropDownListView.Example</item>
<item name="actionBarTabStyle">#style/ActionBarTabStyle.Example</item>
<item name="actionDropDownStyle">#style/DropDownNav.Example</item>
<item name="actionBarStyle">#style/ActionBar.Solid.Example</item>
<item name="actionModeBackground">#drawable/cab_background_top_example</item>
<item name="actionModeSplitBackground">#drawable/cab_background_bottom_example</item>
<item name="actionModeCloseButtonStyle">#style/ActionButton.CloseMode.Example</item>
<!-- Light.DarkActionBar specific -->
<item name="actionBarWidgetTheme">#style/Theme.Example.Widget</item>
</style>
<style name="ActionBar.Solid.Example" parent="#style/Widget.AppCompat.Light.ActionBar.Solid.Inverse">
<item name="background">#drawable/ab_solid_example</item>
<item name="backgroundStacked">#drawable/ab_stacked_solid_example</item>
<item name="backgroundSplit">#drawable/ab_bottom_solid_example</item>
<item name="progressBarStyle">#style/ProgressBar.Example</item>
</style>
<style name="ActionBar.Transparent.Example" parent="#style/Widget.AppCompat.ActionBar">
<item name="background">#drawable/ab_transparent_example</item>
<item name="progressBarStyle">#style/ProgressBar.Example</item>
</style>
<style name="PopupMenu.Example" parent="#style/Widget.AppCompat.PopupMenu">
<item name="android:popupBackground">#drawable/menu_dropdown_panel_example</item>
</style>
<style name="DropDownListView.Example" parent="#style/Widget.AppCompat.ListView.DropDown">
<item name="android:listSelector">#drawable/selectable_background_example</item>
</style>
<style name="ActionBarTabStyle.Example" parent="#style/Widget.AppCompat.ActionBar.TabView">
<item name="android:background">#drawable/tab_indicator_ab_example</item>
</style>
<style name="DropDownNav.Example" parent="#style/Widget.AppCompat.Spinner.DropDown.ActionBar">
<item name="android:background">#drawable/spinner_background_ab_example</item>
<item name="android:popupBackground">#drawable/menu_dropdown_panel_example</item>
<item name="android:dropDownSelector">#drawable/selectable_background_example</item>
</style>
<style name="ProgressBar.Example" parent="#style/Widget.AppCompat.ProgressBar.Horizontal">
<item name="android:progressDrawable">#drawable/progress_horizontal_example</item>
</style>
<style name="ActionButton.CloseMode.Example" parent="#style/Widget.AppCompat.ActionButton.CloseMode">
<item name="android:background">#drawable/btn_cab_done_example</item>
</style>
<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style name="Theme.Example.Widget" parent="#style/Theme.AppCompat">
<item name="popupMenuStyle">#style/PopupMenu.Example</item>
<item name="dropDownListViewStyle">#style/DropDownListView.Example</item>
</style>
AndroidManifest.xml (I just forgot to change the name so it is "Theme.Example")
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example.mes.learnupdater1" >
<application
android:allowBackup="true"
android:icon="#mipmap/ic_launcher"
android:label="#string/app_name"
android:theme="#style/Theme.Example" > --------------------- Theme applied
<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=".Main2Activity"
android:label="#string/title_activity_main2" >
</activity>
</application>
</manifest>
If you want customized your them you need to edit theme under the value folder style. XML file
I have an application which needs to apply different themes on user's choice. So, I have created the themes. These themes are working fine when applied through the Manifest.xml. But when I try to programmatically change the themes, only ActionBar colour is getting changed and the status bar colour remains same like the theme I have applied in Manifest.xml. My codes are in below. I already tried all the available resources but failed to find any solution.
Thanks in advance.
themes.xml
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!--<Cyan Theme Configuration>-->
<style name="Theme.Cyan" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">#color/primary_color_cyan_variant</item>
<item name="colorPrimaryDark">#color/primary_color_dark_cyan_variant</item>
<item name="colorAccent">#color/accent_color_for_cyan_variant</item>
<item name="android:icon">#drawable/ic_launcher</item>
</style>
<style name="Theme.Cyan.ToolBar" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">#color/primary_color_cyan_variant</item>
<item name="colorPrimaryDark">#color/primary_color_dark_cyan_variant</item>
<item name="colorAccent">#color/accent_color_for_cyan_variant</item>
</style>
<style name="Theme.Cyan.ToolBarStyle" parent="ThemeOverlay.AppCompat.Light">
<item name="android:background">#color/primary_color_cyan_variant</item>
<item name="android:textColor">#FFF</item>
<item name="android:textColorSecondary">#color/primary_color_dark_cyan_variant</item>
</style>
<!--<Blue Theme Configuration>-->
<style name="Theme.Blue" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">#color/primary_color_blue_variant</item>
<item name="colorPrimaryDark">#color/primary_color_dark_blue_variant</item>
<item name="colorAccent">#color/accent_color_for_blue_variant</item>
<item name="android:icon">#drawable/ic_launcher</item>
</style>
<style name="Theme.Blue.ToolBar" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">#color/primary_color_blue_variant</item>
<item name="colorPrimaryDark">#color/primary_color_dark_blue_variant</item>
<item name="colorAccent">#color/accent_color_for_blue_variant</item>
</style>
<style name="Theme.Blue.ToolBarStyle" parent="ThemeOverlay.AppCompat.Light">
<item name="android:background">#color/primary_color_blue_variant</item>
<item name="android:textColor">#FFF</item>
<item name="android:textColorSecondary">#color/primary_color_dark_blue_variant</item>
</style>
<!--<Teal Theme Configuration>-->
<style name="Theme.Teal" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">#color/primary_color_teal_variant</item>
<item name="colorPrimaryDark">#color/primary_color_dark_teal_variant</item>
<item name="colorAccent">#color/accent_color_for_teal_variant</item>
<item name="android:icon">#drawable/ic_launcher</item>
</style>
<style name="Theme.Teal.ToolBar" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">#color/primary_color_teal_variant</item>
<item name="colorPrimaryDark">#color/primary_color_dark_teal_variant</item>
<item name="colorAccent">#color/accent_color_for_teal_variant</item>
</style>
<style name="Theme.Teal.ToolBarStyle" parent="ThemeOverlay.AppCompat.Light">
<item name="android:background">#color/primary_color_teal_variant</item>
<item name="android:textColor">#FFF</item>
<item name="android:textColorSecondary">#color/primary_color_dark_teal_variant</item>
</style>
<!--<Green Theme Configuration>-->
<style name="Theme.Green" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">#color/primary_color_green_variant</item>
<item name="colorPrimaryDark">#color/primary_color_dark_green_variant</item>
<item name="colorAccent">#color/accent_color_for_green_variant</item>
<item name="android:icon">#drawable/ic_launcher</item>
</style>
<style name="Theme.Green.ToolBar" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">#color/primary_color_green_variant</item>
<item name="colorPrimaryDark">#color/primary_color_dark_green_variant</item>
<item name="colorAccent">#color/accent_color_for_green_variant</item>
</style>
<style name="Theme.Green.ToolBarStyle" parent="ThemeOverlay.AppCompat.Light">
<item name="android:background">#color/primary_color_green_variant</item>
<item name="android:textColor">#FFF</item>
<item name="android:textColorSecondary">#color/primary_color_dark_green_variant</item>
</style>
<!--<BlueGrey Theme Configuration>-->
<style name="Theme.BlueGrey" parent="Theme.AppCompat.Light.DarkActionBar">
<item name="colorPrimary">#color/primary_color_blueGrey_variant</item>
<item name="colorPrimaryDark">#color/primary_color_dark_blueGrey_variant</item>
<item name="colorAccent">#color/accent_color_for_blueGrey_variant</item>
<item name="android:icon">#drawable/ic_launcher</item>
</style>
<style name="Theme.BlueGrey.ToolBar" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">#color/primary_color_blueGrey_variant</item>
<item name="colorPrimaryDark">#color/primary_color_dark_blueGrey_variant</item>
<item name="colorAccent">#color/accent_color_for_blueGrey_variant</item>
</style>
<style name="Theme.BlueGrey.ToolBarStyle" parent="ThemeOverlay.AppCompat.Light">
<item name="android:background">#color/primary_color_blueGrey_variant</item>
<item name="android:textColor">#FFF</item>
<item name="android:textColorSecondary">#color/primary_color_dark_blueGrey_variant</item>
</style>
</resources>
styles.xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.Green">
<!-- Customize your theme here. -->
</style>
<style name="Ocean" parent="Theme.Cyan"/>
<style name="Sky" parent="Theme.Blue"/>
<style name="Peacock" parent="Theme.Teal"/>
<style name="AppTheme.Grass" parent="Theme.Green"/>
<style name="Shadow" parent="Theme.BlueGrey"/>
<style name="menu_labels_style">
<!--<item name="android:background">#drawable/fab_label_background</item>-->
<item name="android:textColor">#color/white</item>
</style>
</resources>
Manifest.xml
<application
android:name="com.compassites.employeedirectory.EmployeeDirectoryApplication"
android:allowBackup="true"
android:icon="#drawable/ic_launcher"
android:label="#string/app_name"
android:theme="#style/AppTheme" >
MainActivity.java
super.onCreate(savedInstanceState);
setTheme(R.style.Ocean);
setContentView(R.layout.activity_main);
Call set theme before super.onCreate
i.e.
setTheme(R.style.Ocean);
super.onCreate(savedInstanceState);
I try to change alertDialog's textSize via theme.xml but I can do it. This is my code from manifest:
<application
android:allowBackup="true"
android:icon="#drawable/appicon"
android:label="#string/app_name"
android:theme="#style/CustomActionBarTheme">
And my themes.xml:
<style name="CustomActionBarTheme"
parent="#android:style/Theme.Holo.Light.DarkActionBar">
<item name="android:actionBarStyle">#style/CustomBar</item>
<item name="android:actionBarTabTextStyle">#style/Widget.CustomTabText</item>
<item name="android:actionMenuTextAppearance">#style/CustomBar.MenuTextStyle</item>
<item name="android:alertDialogStyle">#style/CustomDialogTheme</item>
</style>
<style name="CustomDialogTheme" parent="#android:style/Theme.Dialog">
<item name="android:bottomBright">#color/white</item>
<item name="android:bottomDark">#color/white</item>
<item name="android:bottomMedium">#color/white</item>
<item name="android:centerBright">#color/white</item>
<item name="android:centerDark">#color/white</item>
<item name="android:centerMedium">#color/white</item>
<item name="android:fullBright">#color/blueDialog</item>
<item name="android:fullDark">#color/blueDialog</item>
<item name="android:topBright">#color/blueDialog</item>
<item name="android:topDark">#color/blueDialog</item>
<item name="android:textSize">50sp</item>
</style>
Thanks in advance!!!
I can answer myself:
<application
android:allowBackup="true"
android:icon="#drawable/varmasinfondo"
android:label="#string/app_name"
android:theme="#style/CustomerAppBaseTheme"
>
<style name="CustomerAppBaseTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<item name="android:alertDialogTheme">#style/CustomerAlertDialogTheme</item>
<item name="android:alertDialogStyle">#style/CustomerAlertDialogStyle</item>
<item name="android:actionBarStyle">#style/CustomBar</item>
<item name="android:actionBarTabTextStyle">#style/Widget.CustomTabText</item>
<item name="android:actionMenuTextAppearance">#style/CustomBar.MenuTextStyle</item>
</style>
<style name="CustomerAlertDialogTheme">...
</style>
<style name="CustomerAlertDialogStyle">...
</style>
...
And then you can change the style for ActionBar and Alertdialog.
<?xml version="1.0" encoding="utf-8"?>
<style name="OmlActionBarTheme" parent="#android:style/Theme.Holo.Light.DarkActionBar">
<item name="android:actionBarStyle">#style/OmlActionBar</item>
<item name="android:homeAsUpIndicator">#drawable/back_arrow</item>
<item name="android:titleTextStyle">#style/OmlActionBarTitle</item>
<item name="android:subtitleTextStyle">#style/OmlActionBarSubTitle</item>
</style>
<style name="OmlActionBar" parent="#android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">
<item name="android:background">#color/action_bar_white</item>
</style>
<style name="OmlActionBarTitle" parent="#android:style/TextAppearance.Holo.Widget.ActionBar.Title">
<item name="android:textColor">#color/action_bar_blue</item>
</style>
<style name="OmlActionBarSubTitle" parent="#android:style/TextAppearance.Holo.Widget.ActionBar.Subtitle">
<item name="android:textColor">#color/action_bar_blue</item>
</style>
Hi,I need to customize my actionBar title Text Color and subTitle Text Color. I used the above style but there is no change.
Try The Following...
style.xml
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
<item name="android:windowBackground">#drawable/login_background</item>
<item name="android:actionBarStyle">#style/MyActionBar</item>
<item name="android:actionBarStyle">#style/MyActionBar</item>
</style>
<style name="MyActionBar"
parent="#android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">
<item name="android:background">#color/theme_blue</item>
<item name="titleTextStyle">#style/ActionBarTitleText</item>
<item name="subtitleTextStyle">#style/ActionBarSubTitleText</item>
</style>
<style name="ActionBarTitleText" parent="#style/TextAppearance.AppCompat.Widget.ActionBar.Title">
<item name="android:textColor">#color/stdDarkBlueText</item>
<item name="android:textSize">12sp</item>
</style>
<style name="ActionBarSubTitleText" parent="#style/TextAppearance.AppCompat.Widget.ActionBar.Subtitle">
<item name="android:textColor">#color/stdDarkBlueText</item>
<item name="android:textSize">12sp</item>
</style>
</resources>
Apply this theme to your application in Manifest File..
AndroidManifest.xml
<application
android:allowBackup="true"
android:icon="#drawable/ic_icon128"
android:label="#string/app_name"
android:theme="#style/AppTheme" // apply theme here
android:windowSoftInputMode="stateHidden" >
i have done with simple one line code
actionBar.setTitle(Html.fromHtml("<font color='#ff0000'>ActionBartitle </font>"));
I'm having some troubles changing the color for the ActionBar. I'm using AppCompat library for support. Everything else works: like background, or selector ... but the title color isn't changing.
This is my style file:
<resources xmlns:android="http://schemas.android.com/apk/res/android" xmlns:tools="http://schemas.android.com/tools">
<style name="Theme.Customtitletheme" parent="#style/Theme.AppCompat.Light">
<item name="actionBarItemBackground">#drawable/selectable_background_customtitletheme</item>
<item name="android:actionBarItemBackground" tools:targetApi="14">#drawable/selectable_background_customtitletheme</item>
<item name="popupMenuStyle">#style/PopupMenu.Customtitletheme</item>
<item name="android:popupMenuStyle" tools:targetApi="11">#style/PopupMenu.Customtitletheme</item>
<item name="dropDownListViewStyle">#style/DropDownListView.Customtitletheme</item>
<item name="android:dropDownListViewStyle">#style/DropDownListView.Customtitletheme</item>
<item name="actionBarTabStyle">#style/ActionBarTabStyle.Customtitletheme</item>
<item name="android:actionBarTabStyle" tools:targetApi="11">#style/ActionBarTabStyle.Customtitletheme</item>
<item name="actionDropDownStyle">#style/DropDownNav.Customtitletheme</item>
<item name="android:actionDropDownStyle" tools:targetApi="11">#style/DropDownNav.Customtitletheme</item>
<item name="actionBarStyle">#style/ActionBar.Solid.Customtitletheme</item>
<item name="android:actionBarStyle" tools:targetApi="11">#style/ActionBar.Solid.Customtitletheme</item>
<item name="actionModeBackground">#drawable/cab_background_top_customtitletheme</item>
<item name="android:actionModeBackground" tools:targetApi="11">#drawable/cab_background_top_customtitletheme</item>
<item name="actionModeSplitBackground">#drawable/cab_background_bottom_customtitletheme</item>
<item name="android:actionModeSplitBackground" tools:targetApi="14">#drawable/cab_background_bottom_customtitletheme</item>
<item name="actionModeCloseButtonStyle">#style/ActionButton.CloseMode.Customtitletheme</item>
<item name="android:actionModeCloseButtonStyle" tools:targetApi="11">#style/ActionButton.CloseMode.Customtitletheme</item>
<item name="actionMenuTextColor">#color/actionbar_text</item>
<item name="android:actionMenuTextColor" tools:targetApi="11">#color/actionbar_text</item>
</style>
<style name="ActionBar.Solid.Customtitletheme" parent="#style/Widget.AppCompat.Light.ActionBar.Solid">
<item name="background">#drawable/ab_solid_customtitletheme</item>
<item name="android:background">#drawable/ab_background_textured_customtitletheme</item>
<item name="backgroundStacked">#drawable/ab_stacked_solid_customtitletheme</item>
<item name="android:backgroundStacked" tools:targetApi="14">#drawable/ab_stacked_solid_customtitletheme</item>
<item name="backgroundSplit">#drawable/ab_bottom_solid_customtitletheme</item>
<item name="android:backgroundSplit" tools:targetApi="14">#drawable/ab_background_textured_customtitletheme</item>
<item name="progressBarStyle">#style/ProgressBar.Customtitletheme</item>
<item name="android:progressBarStyle">#style/ProgressBar.Customtitletheme</item>
<item name="titleTextStyle">#style/ActionBar.CustomTitle</item>
<item name="android:textStyle">#style/ActionBar.CustomTitle</item>
</style>
<style name="PopupMenu.Customtitletheme" parent="#style/Widget.AppCompat.Light.PopupMenu">
<item name="android:popupBackground">#drawable/menu_dropdown_panel_customtitletheme</item>
</style>
<style name="DropDownListView.Customtitletheme" parent="#style/Widget.AppCompat.Light.ListView.DropDown">
<item name="android:listSelector">#drawable/selectable_background_customtitletheme</item>
</style>
<style name="ActionBarTabStyle.Customtitletheme" parent="#style/Widget.AppCompat.Light.ActionBar.TabView">
<item name="android:background">#drawable/tab_indicator_ab_customtitletheme</item>
</style>
<style name="DropDownNav.Customtitletheme" parent="#style/Widget.AppCompat.Light.Spinner.DropDown.ActionBar">
<item name="android:background">#drawable/spinner_background_ab_customtitletheme</item>
<item name="android:popupBackground">#drawable/menu_dropdown_panel_customtitletheme</item>
<item name="android:dropDownSelector">#drawable/selectable_background_customtitletheme</item>
</style>
<style name="ProgressBar.Customtitletheme" parent="#style/Widget.AppCompat.ProgressBar.Horizontal">
<item name="android:progressDrawable">#drawable/progress_horizontal_customtitletheme</item>
</style>
<style name="ActionButton.CloseMode.Customtitletheme" parent="#style/Widget.AppCompat.Light.ActionButton.CloseMode">
<item name="android:background">#drawable/btn_cab_done_customtitletheme</item>
</style>
<!-- ActionBar title text -->
<style name="ActionBar.CustomTitle" parent="#style/TextAppearance.AppCompat.Widget.ActionBar.Title">
<item name="android:textColor">#color/actionbar_text</item>
<!-- The textColor property is backward compatible with the Support Library -->
</style>
<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style name="Theme.Customtitletheme.Widget" parent="#style/Theme.AppCompat">
<item name="popupMenuStyle">#style/PopupMenu.Customtitletheme</item>
<item name="android:popupMenuStyle" tools:targetApi="11">#style/PopupMenu.Customtitletheme</item>
<item name="dropDownListViewStyle">#style/DropDownListView.Customtitletheme</item>
<item name="android:dropDownListViewStyle">#style/DropDownListView.Customtitletheme</item>
</style>
</resources>
I have also used different values folders, like values-v14 or values-v11, but the same result.
If I change the parent from "Theme.AppCompat.Light" to "Theme.AppCompat.Dark" the color changes, but when I want to use some custom color it is not working...
Also, this is how I used the specified theme in manifest:
<activity
android:name="com.cos.ShareActivity"
android:label="Share File"
android:parentActivityName="com.cos.FileManagerActivity"
android:theme="#style/Theme.Customtitletheme" >
<!-- Parent activity meta-data to support 4.0 and lower -->
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="com.cos.FileManagerActivity" />
</activity>
What I am doing wrong that the color item is ignored ?
After so much time lost trying to figure it out, I found that it was a typo ... damn ... I have used android:textStyle instead of android:titleTextStyle. When I typed in that line the IDE auto-suggest typed the first one :(