I am working on Android project, what I can't change is line between Tab items. Now it's light white / gray, but I want to make it black. I've tried to change style ActionBar.Solid.A with background to black, but it didn't solve the problem. Before I ask question I've check several similar problems, but didn't find solution...
Theme Style
<?xml version="1.0" encoding="utf-8"?>
<resources>
<style name="Theme.A" parent="#android:style/Theme.Holo.Light.DarkActionBar">
<item name="android:actionBarItemBackground">#drawable/selectable_background_A</item>
<item name="android:popupMenuStyle">#style/PopupMenu.A</item>
<item name="android:dropDownListViewStyle">#style/DropDownListView.A</item>
<item name="android:actionBarTabStyle">#style/ActionBarTabStyle.A</item>
<item name="android:actionDropDownStyle">#style/DropDownNav.A</item>
<item name="android:actionBarStyle">#style/ActionBar.Solid.A</item>
<item name="android:actionModeBackground">#drawable/cab_background_top_A</item>
<item name="android:actionModeSplitBackground">#drawable/cab_background_bottom_A</item>
<item name="android:actionModeCloseButtonStyle">#style/ActionButton.CloseMode.A</item>
<!--<item name="android:actionOverflowButtonStyle">#style/Widget.ActionButton.Overflow</item>-->
<!-- Light.DarkActionBar specific -->
<item name="android:actionBarWidgetTheme">#style/Theme.A.Widget</item>
</style>
<style name="ActionBar.Solid.A" parent="#android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">
<item name="android:titleTextStyle">#style/Theme.A.TitleTextStyle</item>
<item name="android:background">#drawable/ab_solid_A</item>
<item name="android:backgroundStacked">#drawable/ab_stacked_solid_A</item>
<item name="android:backgroundSplit">#drawable/ab_bottom_solid_A</item>
<item name="android:progressBarStyle">#style/ProgressBar.A</item>
</style>
<style name="ActionBar.Transparent.A" parent="#android:style/Widget.Holo.ActionBar">
<item name="android:background">#drawable/ab_transparent_A</item>
<item name="android:progressBarStyle">#style/ProgressBar.A</item>
</style>
<style name="PopupMenu.A" parent="#android:style/Widget.Holo.ListPopupWindow">
<item name="android:popupBackground">#drawable/menu_dropdown_panel_A</item>
</style>
<style name="DropDownListView.A" parent="#android:style/Widget.Holo.ListView.DropDown">
<item name="android:listSelector">#drawable/selectable_background_A</item>
<item name="android:textColor">#color/main_white_color</item>
</style>
<style name="ActionBarTabStyle.A" parent="#android:style/Widget.Holo.ActionBar.TabView">
<item name="android:background">#drawable/tab_indicator_ab_A</item>
</style>
<style name="DropDownNav.A" parent="#android:style/Widget.Holo.Spinner">
<item name="android:background">#drawable/spinner_background_ab_A</item>
<item name="android:popupBackground">#drawable/menu_dropdown_panel_A</item>
<item name="android:dropDownSelector">#drawable/selectable_background_A</item>
</style>
<style name="DropDownSpinner.A" parent="#android:style/Widget.Holo.Light.Spinner">
<item name="android:popupBackground">#drawable/menu_dropdown_panel_spinner</item>
</style>
<style name="ProgressBar.A" parent="#android:style/Widget.Holo.ProgressBar.Horizontal">
<item name="android:progressDrawable">#drawable/progress_horizontal_A</item>
</style>
<style name="ActionButton.CloseMode.A" parent="#android:style/Widget.Holo.ActionButton.CloseMode">
<item name="android:background">#drawable/btn_cab_done_A</item>
</style>
<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style name="Theme.A.Widget" parent="#android:style/Theme.Holo">
<item name="android:popupMenuStyle">#style/PopupMenu.A</item>
<item name="android:dropDownListViewStyle">#style/DropDownListView.A</item>
<item name="android:textColor">#color/main_white_color</item>
</style>
<!-- ActionBar TitleTextStyle styles -->
<style name="Theme.A.TitleTextStyle" parent="#android:style/TextAppearance.Holo.Widget.ActionBar.Title">
<item name="android:textColor">#color/main_white_color</item>
</style>
<!-- ActionBar SettingIcon style -->
<style name="Widget.ActionButton.Overflow" parent="#android:style/Widget.Holo.ActionButton.Overflow">
<item name="android:src">#drawable/ic_dots</item>
</style>
</resources>
What you want to change is the ActionBarTab divider color. You can do it like this:
Inside ActionBarTabStyle.A definition, add:
<item name="android:actionBarDivider">#drawable/tab_divider</item>
The tab_divider drawable is an XML file as well:
<?xml version="1.0" encoding="utf-8"?>
<rotate xmlns:android="http://schemas.android.com/apk/res/android"
android:fromDegrees="90"
android:toDegrees="90" >
<shape android:shape="line" >
<stroke
android:dashWidth="3dp"
android:width="4dp"
android:color="#android:color/black" />
</shape>
</rotate>
Edit: An alternative solution is simply changing your Theme.A theme directly, adding:
<item name="actionBarDivider">#android:color/black</item>
Note that the android: prefix is not being used.
Related
button style rounded corners not working on android earlier than level 21
Note that I'm applying this style on the whole project
drawable edittext.xml
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle" android:padding="10dp">
<solid android:color="#FFFFFF"/>
<corners
android:bottomRightRadius="15dip"
android:bottomLeftRadius="15dip"
android:topLeftRadius="15dip"
android:topRightRadius="15dip"/>
</shape>
Styles.xml
<resources>
<!-- Base application theme. -->
<style name="AppTheme" parent="Theme.AppCompat.Light.NoActionBar">
<!-- Customize your theme here. -->
<item name="colorPrimary">#color/colorPrimary</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="colorAccent">#color/colorAccent</item>
<item name="android:windowBackground">#color/colorPrimary</item>
<item name="android:buttonStyle">#style/App_ButtonStyle</item>
<item name="editTextStyle">#style/App_EditTextStyle</item>
<item name="android:spinnerStyle">#style/App_SpinnerStyle</item>
</style>
<style name="App_EditTextStyle" parent="#android:style/Widget.EditText">
<item name="android:background">#drawable/edittext</item>
<item name="android:textColor">#color/colorPrimary</item>
<item name="android:padding">5dip</item>
<item name="android:gravity">right</item>
</style>
<style name="App_SpinnerStyle" parent="#android:style/Widget.Spinner">
<item name="android:background">#drawable/edittext</item>
<item name="android:textColor">#color/colorPrimary</item>
<item name="android:padding">5dip</item>
<item name="android:gravity">right</item>
</style>
<style name="App_ButtonStyle" parent="#android:style/Widget.Button">
<item name="android:background">#drawable/edittext</item>
<item name="android:textColor">#color/colorPrimary</item>
<item name="android:padding">10dip</item>
<item name="android:gravity">center</item>
<item name="android:width">150dip</item>
</style>
also spinner style not applied,
This screenshot show how it on android API level 21+
and the below picture shows how it be on earlier than level 21
So any idea what is wrong with this style
Note that Widget.AppCompat.Button didn't solve the problem
Instead of creating another styles.
use button background android:background="#drawable/edittext"
this worked for my in every API level.
I want to change the text color of DatePicker.
I have tried couple of suggestions found here but nothing has worked for me.
The text color, and the selected background stays the same.
The top header background did changed.
<style name="MyThemeDesign" parent="Theme.AppCompat.Light.NoActionBar">
<item name="colorPrimary">#color/btnColor</item>
<item name="colorPrimaryDark">#color/colorPrimaryDark</item>
<item name="android:datePickerStyle">#style/MyDatePickerStyle</item>
</style>
<style name="MyDatePickerStyle" parent="#android:style/Widget.Material.Light.DatePicker">
<item name="android:headerBackground">#color/orange</item>
<item name="android:text">#color/white</item>
<item name="android:calendarTextColor">#color/white</item>
<item name="android:dayOfWeekBackground">#color/white</item>
<item name="android:selectedWeekBackgroundColor">#color/colorRed</item>
<item name="android:yearListSelectorColor">#color/colorRed</item>
<item name="android:colorPrimary">#color/white</item>
<item name="android:colorPrimaryDark">#color/white</item>
<item name="android:colorBackgroundCacheHint">#color/colorRed</item>
<item name="colorAccent">#color/white</item>
<item name="android:textColorPrimary">#color/white</item>
<item name="android:datePickerMode">calendar</item>
<item name="android:minDate">01/01/2017</item>
</style>
In styles.xml:
<style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
...
<item name="android:datePickerStyle">#style/MyDatePickerStyle</item>
</style>
<style name="MyDatePickerStyle" parent="#android:style/Widget.DeviceDefault.DatePicker">
<item name="android:headerBackground">#color/red</item>
<item name="android:headerMonthTextAppearance">#style/MyDatePickerTextAppearance</item>
</style>
<style name="MyDatePickerTextAppearance" parent="TextAppearance.AppCompat.Body1">
<item name="android:textColor">#drawable/my_color_state_list</item>
</style>
drawable/my_color_state_list.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<!-- Month color -->
<item android:color="#color/yellow" android:state_selected="true"/>
<!-- Year color -->
<item android:color="#color/purple" />
</selector>
If you also want to control the selected date color, then add this theme to style.xml:
<style name="MyDatePickerTheme" parent="AppTheme">
<item name="colorAccent">#color/blue</item>
</style>
In layout:
<DatePicker
android:theme="#style/MyDatePickerTheme"
.../>
Result:
Hi I do have created a theme/style for an AlertDialog. However I do have the problem with the button bar, that it's still grey even after I have set the background color. Also the Button inside the bar is not filling the bar as I expected. I tried serveral things but I was not able to get this done.
<style name="MyBorderlessButton">
<!-- Set background drawable and text size of the buttons here -->
<item name="android:background">#drawable/button_dark_border</item>
<item name="android:textColor">#color/white</item>
</style>
<style name="MyButtonBar" parent="#android:style/ButtonBar">
<!-- Define a background for the button bar and a divider between the buttons here -->
<item name="android:divider">?android:attr/dividerVertical</item>
<item name="android:dividerPadding">1dp</item>
<item name="android:showDividers">middle</item>
<item name="android:padding">3dp</item>
<item name="android:background">#color/transparent</item>
</style>
<style name="MyAlertDialogTitle">
<item name="android:maxLines">1</item>
<item name="android:scrollHorizontally">true</item>
</style>
<style name="MyAlertTextAppearance">
<!-- Set text size and color of title and message here -->
<item name="android:textColor">#color/white</item>
</style>
<style name="MyAlertDialogTheme" parent="android:Theme.Dialog">
<item name="android:windowBackground">#color/transparent</item>
<item name="android:windowTitleStyle">#style/MyAlertDialogTitle</item>
<item name="android:windowContentOverlay">#null</item>
<item name="android:windowMinWidthMajor">#android:dimen/dialog_min_width_major</item>
<item name="android:windowMinWidthMinor">#android:dimen/dialog_min_width_minor</item>
<item name="android:windowIsFloating">true</item>
<item name="android:textAppearanceMedium">#style/MyAlertTextAppearance</item>
<!--
If you don't want your own button bar style use
#android:style/Holo.Light.ButtonBar.AlertDialog
and
?android:attr/borderlessButtonStyle
instead of #style/MyButtonBar and #style/MyBorderlessButton
-->
<item name="android:buttonBarStyle">#style/MyButtonBar</item>
<item name="android:buttonBarButtonStyle">#style/MyBorderlessButton</item>
</style>
<style name="MyAlertDialogStyle">
<!-- Define background colors of title, message, buttons, etc. here -->
<item name="android:background">#color/drawer_background</item>
</style>
button_dark_border:
<shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle" >
<solid android:color="#color/drawer_background" />
<stroke android:width="1dip" android:color="#color/white"/>
</shape>
How can I make the Button bar also black and the Button fill the AlertDialog again?
I fixed the problem updating the styles file. After some time i found that the parent attribute was blocking some of my changes. Here is my styles.xml now
<style name="Theme.PeeDeeTheme" parent="Theme.AppCompat.Light.NoActionBar">
<item name="android:alertDialogTheme">#style/PeeDeeAlertDialogTheme</item>
<item name="android:alertDialogStyle">#style/PeeDeeAlertDialogStyle</item>
</style>
<style name="MyBorderlessButton">
<!-- Set background drawable and text size of the buttons here -->
<item name="android:background">#color/primarycolor_dark</item>
<item name="android:textColor">#color/white</item>
<!--
Setting the weight as follows should result in equally wide buttons filling the alert dialog width,
but instead they span further out of the dialog, breaking in multiple lines though
-->
<item name="android:layout_width">0dp</item>
<item name="android:layout_weight">1</item>
<item name="android:layout_height">15dp</item>
<item name="android:height">#null</item>
</style>
<style name="MyButtonBar">
<!-- Define a background for the button bar and a divider between the buttons here -->
<item name="android:divider">?android:attr/listDivider</item>
<item name="android:dividerHeight">1dp</item>
<item name="android:showDividers">none</item>
<item name="android:padding">0dp</item>
<item name="android:background">#color/transparent</item>
<!-- Making sure, the button bar uses parent width and is not restricted in height -->
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:height">#null</item>
<item name="android:minHeight">#null</item>
</style>
<style name="MyAlertDialogTitle">
<item name="android:maxLines">1</item>
<item name="android:scrollHorizontally">true</item>
<item name="android:textColor">#color/defaultcolor_drawer</item>
</style>
<style name="MyAlertTextAppearance">
<!-- Set text size and color of title and message here -->
<item name="android:textColor">#color/white</item>
</style>
<style name="MyAlertDialogTheme">
<item name="android:windowBackground">#color/transparent</item>
<item name="android:windowTitleStyle">#style/MyAlertDialogTitle</item>
<item name="android:windowContentOverlay">#null</item>
<item name="android:windowMinWidthMajor">#android:dimen/dialog_min_width_major</item>
<item name="android:windowMinWidthMinor">#android:dimen/dialog_min_width_minor</item>
<item name="android:windowIsFloating">true</item>
<item name="android:textAppearanceMedium">#style/MyAlertTextAppearance</item>
<item name="android:buttonBarStyle">#style/MyButtonBar</item>
<item name="android:buttonBarButtonStyle">#style/MyBorderlessButton</item>
<item name="android:panelBackground">#color/transparent</item>
</style>
<style name="MyAlertDialogStyle">
<!-- Define background colors of title, message, buttons, etc. here -->
<item name="android:fullDark">#color/drawer_background</item>
<item name="android:topDark">#color/drawer_background</item>
<item name="android:centerDark">#color/drawer_background</item>
<item name="android:bottomDark">#color/transparent</item>
<item name="android:fullBright">#color/drawer_background</item>
<item name="android:topBright">#color/drawer_background</item>
<item name="android:centerBright">#color/drawer_background</item>
<item name="android:bottomBright">#color/transparent</item>
<item name="android:bottomMedium">#color/transparent</item>
<item name="android:centerMedium">#color/drawer_background</item>
<item name="android:panelBackground">#color/drawer_background</item>
</style>
I need to change text color of a popuo menu but I don't find any way for do this, I can change background of popmenu but not the text, I edit the style.xml in this way:
<style name="AppBaseTheme" parent="Theme.AppCompat.Light">
<!-- API 14 theme customizations can go here. -->
<item name="popupMenuStyle">#style/MyPopupMenu</item>
<item name="android:textAppearanceLargePopupMenu">#style/myPopupMenuTextAppearanceLarge</item>
<item name="android:textAppearanceSmallPopupMenu">#style/myPopupMenuTextAppearanceSmall</item>
</style>
<style name="MyPopupMenu" parent="#style/Widget.AppCompat.PopupMenu">
<item name="android:popupBackground">#0F213F</item>
</style>
<style name="myPopupMenuTextAppearanceSmall" parent="#style/TextAppearance.AppCompat.Base.Widget.PopupMenu.Small">
<item name="android:textColor">#ffffff</item>
</style>
<style name="myPopupMenuTextAppearanceLarge" parent="#style/TextAppearance.AppCompat.Base.Widget.PopupMenu.Large">
<item name="android:textColor">#ffffff</item>
</style>
where is the mistake?
In styles.xml
<style name="itemTextStyle.AppTheme" parent="#android:style/TextAppearance.Widget.IconMenu.Item">
<item name="android:textColor">#drawable/color_item_popup</item>
<item name="android:textSize">#dimen/text_content</item>
</style>
and add in AppTheme
<item name="android:itemTextAppearance">#style/itemTextStyle.AppTheme</item>
color_item_popup.xml
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:color="#color/primary_text"/>
<item android:state_focused="true" android:color="#color/primary_text"/>
<item android:color="#color/secondary_text"/>
</selector>
<item name="textAppearanceLargePopupMenu">#style/TextAppearance.AppCompat.Light.Widget.PopupMenu.Large</item>
<item name="textAppearanceSmallPopupMenu">#style/TextAppearance.AppCompat.Light.Widget.PopupMenu.Small</item>
I think that you are using TextAppearance.AppCompat.Base.Widget.PopupMenu. Here is the error, you are using another parent that doesn´t response the current style.
You have to use:
TextAppearance.AppCompat.Light.Widget.PopupMenu.
In styles.xml:
<style name="PopupMenu" parent="Widget.AppCompat.PopupMenu.Overflow">
<item name="android:popupBackground">#color/white</item>
</style>
In java:
Context wrapper = new ContextThemeWrapper(getContext(), R.style.PopupMenu);
final PopupMenu popupMenu = new PopupMenu(wrapper, view);
//In Main Style
<item name="popupMenuStyle">#style/popupMenuStyle</item>
<item name="android:textAppearanceSmallPopupMenu">#style/myPopupMenuTextAppearanceSmall</item>
<item name="android:textAppearanceLargePopupMenu">#style/myPopupMenuTextAppearanceLarge</item>
//In Define part
<style name="popupMenuStyle" parent="Widget.AppCompat.PopupMenu">
<item name="android:popupBackground">#drawable/popup_bg</item>
<item name="android:textColor">#ffffff</item>
</style>
<style name="myPopupMenuTextAppearanceSmall" parent="#style/TextAppearance.AppCompat.Widget.PopupMenu.Small">
<item name="android:textColor">#ffffff</item>
</style>
<style name="myPopupMenuTextAppearanceLarge" parent="#style/TextAppearance.AppCompat.Widget.PopupMenu.Large">
<item name="android:textColor">#ffffff</item>
</style>
//you may use this background
//popup_bg.xml
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<gradient
android:angle="135"
android:centerColor="#c8232323"
android:endColor="#c80d0d0d"
android:startColor="#c8434242"
android:type="linear" />
</shape>
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 :(