MaterialDatePicker calendar numbers are not aligned on the center - android

Description: Numbers are not aligned on the center
Expected behavior: Numbers should be aligned on the center
Source code:
NOTE: The same behavior occured even before adding any style
<style name="OeamtcThemeOverlay_MaterialCalendar"
parent="#style/Theme.MaterialComponents.Light.Dialog">
<item name="android:colorAccent">#color/oeamtc_accent</item>
<item name="headerLayout">#style/Oeamtc_MaterialCalendar_Header</item>
<item name="android:colorButtonNormal">#color/oeamtc_accent</item>
<item name="android:button">#color/oeamtc_accent</item>
<item name="buttonBarPositiveButtonStyle">#style/ThemeMaterialCalendarButton</item>
<item name="buttonBarNegativeButtonStyle">#style/ThemeMaterialCalendarButton</item>
<item name="materialCalendarStyle">#style/Oeamtc_MaterialCalendar</item>
<item name="materialButtonStyle">#style/ThemeMaterialButton</item>
</style>
<style name="Oeamtc_MaterialCalendar"
parent="#style/Widget.MaterialComponents.MaterialCalendar">
<item name="rangeFillColor">#color/oeamtc_accent_transparent_50</item>
<item name="dayStyle">#style/Oeamtc_CalendarDay</item>
<item name="dayTodayStyle">#style/Oeamtc_CalendarToday</item>
<item name="daySelectedStyle">#style/Oeamtc_CalendarSelected</item>
</style>
<style name="ThemeMaterialCalendarButton" parent="Widget.MaterialComponents.Button.TextButton.Dialog">
<item name="android:textColor">#color/oeamtc_accent</item>
</style>
<style name="ThemeMaterialButton" parent="Widget.MaterialComponents.Button">
<item name="android:textColor">#color/white</item>
<item name="android:backgroundTint">#color/oeamtc_accent</item>
</style>
<style name="Oeamtc_CalendarDay" parent="Test.Widget.MaterialComponents.MaterialCalendar.Day">
<item name="itemTextColor">#color/black</item>
<item name="itemFillColor">#color/transparent</item>
<item name="itemStrokeColor">#color/white</item>
<item name="itemStrokeWidth">0dp</item>
<item name="android:gravity">center</item>
<item name="itemShapeAppearance">#style/Test.ShapeAppearanceOverlay.MaterialComponents.MaterialCalendar.Day</item>
<item name="itemShapeAppearanceOverlay">#style/Test.ShapeAppearanceOverlay.MaterialComponents.MaterialCalendar.Day</item>
</style>
<style name="Oeamtc_CalendarSelected" parent="">
<item name="itemFillColor">#color/oeamtc_accent</item>
<item name="itemTextColor">#color/white</item>
<item name="itemStrokeColor">#color/oeamtc_accent</item>
<item name="itemStrokeWidth">0dp</item>
<item name="itemShapeAppearance">#style/Test.ShapeAppearanceOverlay.MaterialComponents.MaterialCalendar.Day</item>
<item name="itemShapeAppearanceOverlay">#style/Test.ShapeAppearanceOverlay.MaterialComponents.MaterialCalendar.Day</item>
</style>
<style name="Oeamtc_CalendarToday" parent="">
<item name="itemTextColor">#color/black</item>
<item name="itemStrokeColor">#color/oeamtc_accent</item>
<item name="itemFillColor">#color/white</item>
<item name="itemStrokeWidth">3dp</item>
<item name="itemShapeAppearance">#style/Test.ShapeAppearanceOverlay.MaterialComponents.MaterialCalendar.Day</item>
<item name="itemShapeAppearanceOverlay">#style/Test.ShapeAppearanceOverlay.MaterialComponents.MaterialCalendar.Day</item>
</style>`
Android API version: 29
Material Library version: 1.1.0
Device: Oneplus 6t and all nexus emulators

I found the reason this happened. Apparently the main theme of the app has to inherit Material theme.

Related

Converting Existing App To New Material Design

i am trying to change the design of an existing app with a new design given by client, the app is none but Q-Municate from Quickblox, the exisitng design is old and using ActionBar, i want to replace everything with the latest Material Design, Adding AppCompact v7 Lib 23,causes affect and errors to some other libraries , so i am using AppCompact v7 19
A Good tutorial or step by step guideline would be appreciated. Thanks in advance
I am pasting my styles.xml
<style name="AppTheme" parent="android:Theme.Holo.Light.DarkActionBar">
<item name="android:actionBarStyle">#style/MyActionBar</item>
<item name="android:actionModeStyle">#style/MyActionMode</item>
</style>
<!-- ActionBar styles -->
<style name="MyActionBar" parent="android:Widget.ActionBar">
<item name="android:background">#color/action_bar_background_color</item>
<item name="android:displayOptions">showTitle</item>
<item name="android:titleTextStyle">#style/MyActionBarTitleText</item>
<item name="android:indeterminateProgressStyle">#style/IndeterminateProgressStyle</item>
</style>
<!-- ActionBar title body -->
<style name="MyActionBarTitleText" parent="android:TextAppearance.Holo.Widget.ActionBar.Title">
<item name="android:textColor">#color/white</item>
</style>
<style name="AppTheme.NoActionBar" parent="android:Theme.Holo.Light.NoActionBar">
<item name="android:windowNoTitle">true</item>
</style>
<style name="MyActionMode">
<item name="android:actionModeCloseDrawable">#drawable/badge_action_mode</item>
<item name="android:actionModeBackground">#drawable/badge_action_mode</item>
<item name="android:windowContentOverlay">#null</item>
<item name="android:titleTextStyle">#style/MyActionModeTitleText</item>
</style>
<style name="MyActionModeTitleText" parent="android:TextAppearance.Holo.Widget.ActionMode.Title">
<item name="android:textColor">#color/white</item>
</style>
<style name="baseToggleBtn">
<item name="android:textOff"></item>
<item name="android:textOn"></item>
</style>
<!-- EmojiTabs styles -->
<style name="EmojiTabImageButton" parent="android:Widget.ImageButton">
<item name="android:background">#drawable/tab_emoji_selector</item>
<item name="android:layout_width">0dip</item>
<item name="android:layout_height">match_parent</item>
<item name="android:layout_weight">1</item>
</style>
<!-- Avatars ImageView style -->
<style name="AvatarImageView">
<item name="android:layout_width">#dimen/image_view_big_avatar_layout_width</item>
<item name="android:layout_height">#dimen/image_view_big_avatar_layout_height</item>
<item name="android:layout_gravity">center|top</item>
<item name="android:scaleType">centerCrop</item>
<item name="android:src">#drawable/placeholder_user</item>
</style>
<style name="IndeterminateProgressStyle" parent="#android:style/Widget.ProgressBar">
<item name="android:minHeight">24dp</item>
<item name="android:maxHeight">24dp</item>
<item name="android:minWidth">32dp</item>
<item name="android:maxWidth">32dp</item>
</style>
<style name="DoneCancelBar">
<item name="android:layout_width">match_parent</item>
<item name="android:layout_height">#dimen/action_bar_height</item>
<item name="android:orientation">horizontal</item>
<item name="android:divider">#drawable/ic_action_divider</item>
<item name="android:showDividers" tools:ignore="NewApi">middle</item>
<item name="android:dividerPadding" tools:ignore="NewApi">12dp</item>
<item name="android:background">#color/action_button_bar</item>
</style>
<style name="ActionButton">
<item name="android:layout_width">0dp</item>
<item name="android:layout_height">match_parent</item>
<item name="android:layout_weight">1</item>
<item name="android:background">#drawable/action_selectable_background</item>
</style>
<style name="ActionButtonText">
<item name="android:layout_width">wrap_content</item>
<item name="android:layout_height">wrap_content</item>
<item name="android:layout_gravity">center</item>
<item name="android:gravity">center_vertical</item>
<item name="android:paddingRight">20dp</item>
<!-- Offsets left drawable -->
<item name="android:drawablePadding">8dp</item>
<item name="android:textColor">#color/action_button_text</item>
<item name="android:textStyle">bold</item>
<item name="android:textSize">13sp</item>
</style>
<style name="ActionButtonText.Done">
<item name="android:drawableLeft">#drawable/ic_action_done</item>
<item name="android:text">#string/dlg_done</item>
</style>
<style name="ActionButtonText.Cancel">
<item name="android:drawableLeft">#drawable/ic_action_cancel</item>
<item name="android:text">#string/dlg_cancel</item>
</style>
On the previsualicer of the mobile phone, you can choose the theme here and choose material (dark or light)

TabPageIndicator looks different in different Android versions

Hi I am using ViewPagerIndicator library.
My project's Target Build is 5.0.1.
In Lollipop version its looking good as expected as below.
But in Jelly Bean version 4.2.1(Samsung Galaxy) its looking as follows.
The styles.xml :
<!-- TO CHECK WITH LIBRARY ADDED STYLES FROM THE LISTSAMPLES PROJECT -->
<style name="StyledIndicators" parent="#android:style/Theme.Light">
<item name="vpiCirclePageIndicatorStyle">#style/CustomCirclePageIndicator</item>
<item name="vpiLinePageIndicatorStyle">#style/CustomLinePageIndicator</item>
<item name="vpiTitlePageIndicatorStyle">#style/CustomTitlePageIndicator</item>
<item name="vpiTabPageIndicatorStyle">#style/CustomTabPageIndicator</item>
<item name="vpiUnderlinePageIndicatorStyle">#style/CustomUnderlinePageIndicator</item>
</style>
<style name="CustomTitlePageIndicator">
<item name="android:background">#18FF0000</item>
<item name="footerColor">#FFAA2222</item>
<item name="footerLineHeight">1dp</item>
<item name="footerIndicatorHeight">3dp</item>
<item name="footerIndicatorStyle">underline</item>
<item name="android:textColor">#AA000000</item>
<item name="selectedColor">#FF000000</item>
<item name="selectedBold">true</item>
</style>
<style name="CustomLinePageIndicator">
<item name="strokeWidth">4dp</item>
<item name="lineWidth">30dp</item>
<item name="unselectedColor">#FF888888</item>
<item name="selectedColor">#FF880000</item>
</style>
<style name="CustomCirclePageIndicator">
<item name="fillColor">#FF888888</item>
<item name="strokeColor">#FF000000</item>
<item name="strokeWidth">2dp</item>
<item name="radius">10dp</item>
<item name="centered">true</item>
</style>
<style name="CustomTabPageIndicator" parent="Widget.TabPageIndicator">
<item name="android:background">#drawable/custom_tab_indicator</item>
<item name="android:textAppearance">#style/CustomTabPageIndicator.Text</item>
<item name="android:textColor">#FFFFFF</item>
<item name="android:textSize">16sp</item>
<item name="android:dividerPadding">10dp</item>
<item name="android:showDividers">middle</item>
<item name="android:paddingLeft">2dp</item>
<item name="android:paddingRight">2dp</item>
<item name="android:fadingEdge">horizontal</item>
<item name="android:fadingEdgeLength">8dp</item>
</style>
<style name="CustomTabPageIndicator.Text" parent="android:TextAppearance.Large">
<item name="android:typeface">sans</item>
</style>
<style name="CustomUnderlinePageIndicator">
<item name="selectedColor">#FFCC0000</item>
<item name="android:background">#FFCCCCCC</item>
<item name="fadeLength">1000</item>
<item name="fadeDelay">1000</item>
</style>
<!-- UPTO THIS LINE -->
What mistake I did?
Is anything going wrong with styles.xml ?
If need more detail,please ask me , I am open to provide.

Submenu text color is different on API level > 20

In my android application the text color of a sub menu item is displayed different on Android 4 (API level <=20) than Android 5.
Android 4
Android 5
My theme looks like the following:
<style name="Theme.Mytheme" parent="#android:style/Theme.Holo.Light.DarkActionBar">
<item name="android:actionBarItemBackground">#drawable/selectable_background_mytheme</item>
<item name="android:popupMenuStyle">#style/PopupMenu.Mytheme</item>
<item name="android:actionBarTabStyle">#style/ActionBarTabStyle.Mytheme</item>
<item name="android:actionDropDownStyle">#style/DropDownNav.Mytheme</item>
<item name="android:actionBarStyle">#style/ActionBar.Solid.Mytheme</item>
<item name="android:actionModeBackground">#drawable/cab_background_top_mytheme</item>
<item name="android:actionModeSplitBackground">#drawable/cab_background_bottom_mytheme</item>
<item name="android:actionModeCloseButtonStyle">#style/ActionButton.CloseMode.Mytheme</item>
<item name="android:windowBackground">#drawable/app_background</item>
<item name="android:actionMenuTextColor">#android:color/white</item>
<!-- Light.DarkActionBar specific -->
<item name="android:actionBarWidgetTheme">#style/Theme.Mytheme.Widget</item>
<!-- Widget styles -->
<item name="android:editTextBackground">#drawable/mytheme_edit_text_holo_light</item>
<item name="android:textColorHighlight">#993e74b4</item>
<item name="android:textSelectHandleLeft">#drawable/mytheme_text_select_handle_left</item>
<item name="android:textSelectHandleRight">#drawable/mytheme_text_select_handle_right</item>
<item name="android:textSelectHandle">#drawable/mytheme_text_select_handle_middle</item>
<item name="android:listChoiceIndicatorMultiple">#drawable/mytheme_btn_check_holo_light</item>
<item name="android:listChoiceIndicatorSingle">#drawable/mytheme_btn_radio_holo_light</item>
<item name="android:buttonStyle">#style/ButtonMytheme</item>
<item name="android:imageButtonStyle">#style/ImageButtonMytheme</item>
<item name="android:dropDownSpinnerStyle">#style/SpinnerMytheme</item>
<item name="android:progressBarStyleHorizontal">#style/ProgressBarMytheme</item>
<item name="android:listChoiceBackgroundIndicator">#drawable/mytheme_list_selector_holo_light</item>
<item name="android:activatedBackgroundIndicator">#drawable/mytheme_activated_background_holo_light</item>
</style>
<style name="ActionBar.Solid.Mytheme" parent="#android:style/Widget.Holo.Light.ActionBar.Solid.Inverse">
<item name="android:background">#drawable/ab_solid_mytheme</item>
<item name="android:backgroundStacked">#drawable/ab_stacked_solid_mytheme</item>
<item name="android:backgroundSplit">#drawable/ab_bottom_solid_mytheme</item>
<item name="android:progressBarStyle">#style/ProgressBar.Mytheme</item>
</style>
<style name="ActionBar.Transparent.Mytheme" parent="#android:style/Widget.Holo.ActionBar">
<item name="android:background">#drawable/ab_transparent_mytheme</item>
<item name="android:progressBarStyle">#style/ProgressBar.Mytheme</item>
</style>
<style name="PopupMenu.Mytheme" parent="#android:style/Widget.Holo.ListPopupWindow">
<item name="android:popupBackground">#drawable/menu_dropdown_panel_mytheme</item>
</style>
<style name="DropDownListView.Mytheme" parent="#android:style/Widget.Holo.ListView.DropDown">
<item name="android:listSelector">#drawable/selectable_background_mytheme</item>
<item name="android:textColor">#android:color/white</item>
</style>
<style name="ActionBarTabStyle.Mytheme" parent="#android:style/Widget.Holo.ActionBar.TabView">
<item name="android:background">#drawable/tab_indicator_ab_mytheme</item>
</style>
<style name="DropDownNav.Mytheme" parent="#android:style/Widget.Holo.Spinner">
<item name="android:background">#drawable/spinner_background_ab_mytheme</item>
<item name="android:popupBackground">#drawable/menu_dropdown_panel_mytheme</item>
<item name="android:dropDownSelector">#drawable/selectable_background_mytheme</item>
</style>
<style name="ProgressBar.Mytheme" parent="#android:style/Widget.Holo.ProgressBar.Horizontal">
<item name="android:progressDrawable">#drawable/progress_horizontal_mytheme</item>
</style>
<style name="ActionButton.CloseMode.Mytheme" parent="#android:style/Widget.Holo.ActionButton.CloseMode">
<item name="android:background">#drawable/btn_cab_done_mytheme</item>
</style>
<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style name="Theme.Mytheme.Widget" parent="#android:style/Theme.Holo">
<item name="android:popupMenuStyle">#style/PopupMenu.Mytheme</item>
<item name="android:dropDownListViewStyle">#style/DropDownListView.Mytheme</item>
</style>
What has changed from Android 4 to Android 5 ? What should I add on my theme/style so that I can achieve the same text color on both versions ?

How to change the tab text color of ActionBarSherlock? [duplicate]

This question already has answers here:
How to change the text color of action bar sherlock
(3 answers)
Closed 9 years ago.
I have tried multiple different ways to change the tab text color to actionbarshelock to white and it simply does not work. Here is my styles.xml file.
<style name="Theme.Test" parent="#style/Theme.Sherlock.Light">
<item name="actionBarItemBackground">#drawable/selectable_background_test</item>
<item name="popupMenuStyle">#style/PopupMenu.Test</item>
<item name="dropDownListViewStyle">#style/DropDownListView.Test</item>
<item name="actionBarTabStyle">#style/ActionBarTabStyle.Test</item>
<item name="actionDropDownStyle">#style/DropDownNav.Test</item>
<item name="actionBarStyle">#style/ActionBar.Solid.Test</item>
<item name="actionModeBackground">#drawable/cab_background_top_test</item>
<item name="actionModeSplitBackground">#drawable/cab_background_bottom_test</item>
<item name="actionModeCloseButtonStyle">#style/ActionButton.CloseMode.Test</item>
<item name="android:actionBarItemBackground">#drawable/selectable_background_test</item>
<item name="android:popupMenuStyle">#style/PopupMenu.Test</item>
<item name="android:dropDownListViewStyle">#style/DropDownListView.Test</item>
<item name="android:actionBarTabStyle">#style/ActionBarTabStyle.Test</item>
<item name="android:actionDropDownStyle">#style/DropDownNav.Test</item>
<item name="android:actionBarStyle">#style/ActionBar.Solid.Test</item>
<item name="android:actionModeBackground">#drawable/cab_background_top_test</item>
<item name="android:actionModeSplitBackground">#drawable/cab_background_bottom_test</item>
<item name="android:actionModeCloseButtonStyle">#style/ActionButton.CloseMode.Test</item>
</style>
<style name="ActionBar.Solid.Test" parent="#style/Widget.Sherlock.Light.ActionBar.Solid">
<item name="background">#drawable/ab_solid_test</item>
<item name="backgroundStacked">#drawable/ab_stacked_solid_test</item>
<item name="backgroundSplit">#drawable/ab_bottom_solid_test</item>
<item name="progressBarStyle">#style/ProgressBar.Test</item>
<item name="android:background">#drawable/ab_solid_test</item>
<item name="android:backgroundStacked">#drawable/ab_stacked_solid_test</item>
<item name="android:backgroundSplit">#drawable/ab_bottom_solid_test</item>
<item name="android:progressBarStyle">#style/ProgressBar.Test</item>
<item name="android:titleTextStyle">#style/Test.ActionBar.TitleTextStyle</item>
<item name="titleTextStyle">#style/Test.ActionBar.TitleTextStyle</item>
<item name="actionBarTabTextStyle">#style/MyTabTextStyle</item>
<item name="android:actionBarTabTextStyle">#style/MyTabTextStyle</item>
<item name="android:actionBarStyle">#style/YOURTHEME.ActionBarStyle</item>
<item name="actionBarStyle">#style/YOURTHEME.ActionBarStyle</item>
</style>
<style name="YOURTHEME.ActionBarStyle" parent="Widget.Sherlock.Light.ActionBar">
<item name="android:titleTextStyle">#style/YOURTHEME.ActionBar.TitleTextStyle</item>
<item name="titleTextStyle">#style/YOURTHEME.ActionBar.TitleTextStyle</item>
</style>
<style name="YOURTHEME.ActionBar.TitleTextStyle" parent="TextAppearance.Sherlock.Widget.ActionBar.Title">
<item name="android:textColor">#color/white</item>
</style>
<style name="MyTabTextStyle" parent="style/Widget.Sherlock.Light.ActionBar.TabText">
<item name="android:textColor">#color/white</item>
<item name="android:background">#color/white</item>
</style>
<style name="Test.ActionBar.TitleTextStyle" parent="TextAppearance.Sherlock.Widget.ActionBar.Title">
<item name="android:textColor">#color/white</item>
</style>
<style name="ActionBar.Transparent.Test" parent="#style/Widget.Sherlock.Light.ActionBar">
<item name="background">#drawable/ab_transparent_test</item>
<item name="progressBarStyle">#style/ProgressBar.Test</item>
<item name="android:background">#drawable/ab_transparent_test</item>
<item name="android:progressBarStyle">#style/ProgressBar.Test</item>
</style>
<style name="PopupMenu.Test" parent="#style/Widget.Sherlock.Light.ListPopupWindow">
<item name="android:popupBackground">#drawable/menu_dropdown_panel_test</item>
</style>
<style name="DropDownListView.Test" parent="#style/Widget.Sherlock.Light.ListView.DropDown">
<item name="android:listSelector">#drawable/selectable_background_test</item>
</style>
<style name="ActionBarTabStyle.Test" parent="#style/Widget.Sherlock.Light.ActionBar.TabView">
<item name="android:background">#drawable/tab_indicator_ab_test</item>
</style>
<style name="DropDownNav.Test" parent="#style/Widget.Sherlock.Light.Spinner.DropDown.ActionBar">
<item name="android:background">#drawable/spinner_background_ab_test</item>
<item name="android:popupBackground">#drawable/menu_dropdown_panel_test</item>
<item name="android:dropDownSelector">#drawable/selectable_background_test</item>
</style>
<style name="ProgressBar.Test" parent="#style/Widget.Sherlock.Light.ProgressBar.Horizontal">
<item name="android:progressDrawable">#drawable/progress_horizontal_test</item>
</style>
<style name="ActionButton.CloseMode.Test" parent="#style/Widget.Sherlock.Light.ActionButton.CloseMode">
<item name="android:background">#drawable/btn_cab_done_test</item>
</style>
<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style name="Theme.Test.Widget" parent="#style/Theme.Sherlock">
<item name="popupMenuStyle">#style/PopupMenu.Test</item>
<item name="dropDownListViewStyle">#style/DropDownListView.Test</item>
<item name="android:popupMenuStyle">#style/PopupMenu.Test</item>
<item name="android:dropDownListViewStyle">#style/DropDownListView.Test</item>
</style>
I want to make my text color white but I have no idea how to accomplish this. I'd appreciate if anyone can help me with this.
Thanks!
I got it to work.
This should be in the theme
<item name="actionBarTabTextStyle">#style/tabtextcolor</item>
<item name="android:actionBarTabTextStyle">#style/tabtextcolor</item>
This should be where you define the tab text color.
<style name="tabtextcolor" parent="#style/Widget.Sherlock.ActionBar.TabText">
<item name="android:textColor">#android:color/white</item>
</style>

ActionBar has correct colors in Android 4.2, wrong colors in Android 2.3

I'm using ActionBarSherlock and HoloEverywhere in my app. I used the ActionBar Style Generator to generate my styles and then modified them a bit by hand for text colors, etc.
I'm having a problem where my ActionBar looks correct on my Android 4.2 device (that is, orange with white text), but on my Android 2.3 device the ActionBar is black with grey text.
Does anyone know what might cause this?
<style name="Theme.MyApp" parent="#style/Holo.Theme.Light.DarkActionBar">
<item name="android:actionBarItemBackground">#drawable/selectable_background_MyApp</item>
<item name="android:popupMenuStyle">#style/PopupMenu.MyApp</item>
<item name="android:dropDownListViewStyle">#style/DropDownListView.MyApp</item>
<item name="android:actionBarTabStyle">#style/ActionBarTabStyle.MyApp</item>
<item name="android:actionDropDownStyle">#style/DropDownNav.MyApp</item>
<item name="android:actionBarStyle">#style/ActionBar.Solid.MyApp</item>
<item name="android:actionModeBackground">#drawable/cab_background_top_MyApp</item>
<item name="android:actionModeSplitBackground">#drawable/cab_background_bottom_MyApp</item>
<item name="android:actionModeCloseButtonStyle">#style/ActionButton.CloseMode.MyApp</item>
<!-- <item name="android:textColorPrimary">#FFFFFF</item> -->
<item name="android:spinnerDropDownItemStyle">#style/ActionBar.Solid.MyApp.NavigationDropDownStyle</item>
</style>
<style name="ActionBar.Solid.MyApp" parent="#android:style/Widget.Holo.Light.ActionBar">
<item name="android:background">#drawable/ab_solid_MyApp</item>
<item name="android:backgroundStacked">#drawable/ab_stacked_solid_MyApp</item>
<item name="android:backgroundSplit">#drawable/ab_bottom_solid_MyApp</item>
<item name="android:progressBarStyle">#style/ProgressBar.MyApp</item>
<item name="android:titleTextStyle">#style/ActionBar.Solid.MyApp.TitleTextStyle</item>
</style>
<style name="ActionBar.Solid.MyApp.NavigationDropDownStyle" parent="#android:style/Widget.Holo.DropDownItem.Spinner">
<item name="android:textAppearance">#style/ActionBar.Solid.MyApp.NavigationDropDownStyle.TextStyle</item>
</style>
<style name="ActionBar.Solid.MyApp.NavigationDropDownStyle.TextStyle" parent="#android:style/Widget">
<item name="android:textColor">#color/white</item>
<item name="android:textSize">18sp</item>
</style>
<style name="ActionBar.Solid.MyApp.TitleTextStyle" parent="#android:style/TextAppearance.Holo.Widget.ActionBar.Title">
<item name="android:textColor">#color/white</item>
<item name="android:textSize">18sp</item>
<!-- <item name="android:fontFamily">sans-serif-medium</item> -->
</style>
<style name="ActionBar.Transparent.MyApp" parent="#android:style/Widget.Holo.ActionBar">
<item name="android:background">#drawable/ab_transparent_MyApp</item>
<item name="android:progressBarStyle">#style/ProgressBar.MyApp</item>
</style>
<style name="PopupMenu.MyApp" parent="#android:style/Widget.Holo.ListPopupWindow">
<item name="android:popupBackground">#drawable/menu_dropdown_panel_MyApp</item>
</style>
<style name="DropDownListView.MyApp" parent="#android:style/Widget.Holo.ListView.DropDown">
<item name="android:listSelector">#drawable/selectable_background_MyApp</item>
</style>
<style name="ActionBarTabStyle.MyApp" parent="#android:style/Widget.Holo.ActionBar.TabView">
<item name="android:background">#drawable/tab_indicator_ab_MyApp</item>
</style>
<style name="DropDownNav.MyApp" parent="#android:style/Widget.Holo.Spinner">
<item name="android:background">#drawable/spinner_background_ab_MyApp</item>
<item name="android:popupBackground">#drawable/menu_dropdown_panel_MyApp</item>
<item name="android:dropDownSelector">#drawable/selectable_background_MyApp</item>
</style>
<style name="ProgressBar.MyApp" parent="#android:style/Widget.Holo.ProgressBar.Horizontal">
<item name="android:progressDrawable">#drawable/progress_horizontal_MyApp</item>
</style>
<style name="ActionButton.CloseMode.MyApp" parent="#android:style/Widget.Holo.ActionButton.CloseMode">
<item name="android:background">#drawable/btn_cab_done_MyApp</item>
</style>
<!-- this style is only referenced in a Light.DarkActionBar based theme -->
<style name="Theme.MyApp.Widget" parent="#android:style/Theme.Holo">
<item name="android:popupMenuStyle">#style/PopupMenu.MyApp</item>
<item name="android:dropDownListViewStyle">#style/DropDownListView.MyApp</item>
</style>
--------------- EDIT ----------------------
So I'm now having a problem where the action bar is taking up the entire screen on the Android 2.3 device (but works fine on Android 4.2). Do I need to remove the "android:" from the parent attributes?
parent="#android:style/Widget.Holo.ListPopupWindow"
When I tried this, Eclipse was unable to find the theme.
<resources xmlns:android="http://schemas.android.com/apk/res/android">
<style name="Theme.MyApp" parent="#style/Holo.Theme.Light.DarkActionBar">
<item name="android:actionBarItemBackground">#drawable/selectable_background_MyApp</item>
<item name="android:popupMenuStyle">#style/PopupMenu.MyApp</item>
<item name="android:dropDownListViewStyle">#style/DropDownListView.MyApp</item>
<item name="android:actionBarTabStyle">#style/ActionBarTabStyle.MyApp</item>
<item name="android:actionDropDownStyle">#style/DropDownNav.MyApp</item>
<item name="android:actionBarStyle">#style/ActionBar.Solid.MyApp</item>
<item name="android:actionModeBackground">#drawable/cab_background_top_MyApp</item>
<item name="android:actionModeSplitBackground">#drawable/cab_background_bottom_MyApp</item>
<item name="android:actionModeCloseButtonStyle">#style/ActionButton.CloseMode.MyApp</item>
<!-- <item name="android:textColorPrimary">#FFFFFF</item> -->
<item name="android:spinnerDropDownItemStyle">#style/ActionBar.Solid.MyApp.NavigationDropDownStyle</item>
<item name="actionBarItemBackground">#drawable/selectable_background_MyApp</item>
<item name="popupMenuStyle">#style/PopupMenu.MyApp</item>
<item name="dropDownListViewStyle">#style/DropDownListView.MyApp</item>
<item name="actionBarTabStyle">#style/ActionBarTabStyle.MyApp</item>
<item name="actionDropDownStyle">#style/DropDownNav.MyApp</item>
<item name="actionBarStyle">#style/ActionBar.Solid.MyApp</item>
<item name="actionModeBackground">#drawable/cab_background_top_MyApp</item>
<item name="actionModeSplitBackground">#drawable/cab_background_bottom_MyApp</item>
<item name="actionModeCloseButtonStyle">#style/ActionButton.CloseMode.MyApp</item>
<!-- <item name="textColorPrimary">#FFFFFF</item> -->
<item name="spinnerDropDownItemStyle">#style/ActionBar.Solid.MyApp.NavigationDropDownStyle</item>
</style>
<style name="ActionBar.Solid.MyApp" parent="#android:style/Widget.Holo.Light.ActionBar">
<item name="android:background">#drawable/ab_solid_MyApp</item>
<item name="android:backgroundStacked">#drawable/ab_stacked_solid_MyApp</item>
<item name="android:backgroundSplit">#drawable/ab_bottom_solid_MyApp</item>
<item name="android:progressBarStyle">#style/ProgressBar.MyApp</item>
<item name="android:titleTextStyle">#style/ActionBar.Solid.MyApp.TitleTextStyle</item>
<item name="background">#drawable/ab_solid_MyApp</item>
<item name="backgroundStacked">#drawable/ab_stacked_solid_MyApp</item>
<item name="backgroundSplit">#drawable/ab_bottom_solid_MyApp</item>
<item name="progressBarStyle">#style/ProgressBar.MyApp</item>
<item name="titleTextStyle">#style/ActionBar.Solid.MyApp.TitleTextStyle</item>
</style>
<style name="ActionBar.Solid.MyApp.NavigationDropDownStyle" parent="#android:style/Widget.Holo.DropDownItem.Spinner">
<item name="android:textAppearance">#style/ActionBar.Solid.MyApp.NavigationDropDownStyle.TextStyle</item>
</style>
<style name="ActionBar.Solid.MyApp.NavigationDropDownStyle.TextStyle" parent="#android:style/Widget">
<item name="android:textColor">#color/white</item>
<item name="android:textSize">18sp</item>
</style>
<style name="ActionBar.Solid.MyApp.TitleTextStyle" parent="#android:style/TextAppearance.Holo.Widget.ActionBar.Title">
<item name="android:textColor">#color/white</item>
<item name="android:textSize">18sp</item>
<!-- <item name="android:fontFamily">sans-serif-medium</item> -->
</style>
<style name="ActionBar.Transparent.MyApp" parent="#android:style/Widget.Holo.ActionBar">
<item name="android:background">#drawable/ab_transparent_MyApp</item>
<item name="android:progressBarStyle">#style/ProgressBar.MyApp</item>
<item name="background">#drawable/ab_transparent_MyApp</item>
<item name="progressBarStyle">#style/ProgressBar.MyApp</item>
</style>
<style name="PopupMenu.MyApp" parent="#android:style/Widget.Holo.ListPopupWindow">
<item name="android:popupBackground">#drawable/menu_dropdown_panel_MyApp</item>
</style>
<style name="DropDownListView.MyApp" parent="#android:style/Widget.Holo.ListView.DropDown">
<item name="android:listSelector">#drawable/selectable_background_MyApp</item>
</style>
<style name="ActionBarTabStyle.MyApp" parent="#android:style/Widget.Holo.ActionBar.TabView">
<item name="android:background">#drawable/tab_indicator_ab_MyApp</item>
<item name="background">#drawable/tab_indicator_ab_MyApp</item>
</style>
<style name="DropDownNav.MyApp" parent="#android:style/Widget.Holo.Spinner">
<item name="android:background">#drawable/spinner_background_ab_MyApp</item>
<item name="android:popupBackground">#drawable/menu_dropdown_panel_MyApp</item>
<item name="android:dropDownSelector">#drawable/selectable_background_MyApp</item>
<item name="background">#drawable/spinner_background_ab_MyApp</item>
</style>
<style name="ProgressBar.MyApp" parent="#android:style/Widget.Holo.ProgressBar.Horizontal">
<item name="android:progressDrawable">#drawable/progress_horizontal_MyApp</item>
</style>
<style name="ActionButton.CloseMode.MyApp" parent="#android:style/Widget.Holo.ActionButton.CloseMode">
<item name="android:background">#drawable/btn_cab_done_MyApp</item>
<item name="background">#drawable/btn_cab_done_MyApp</item>
</style>
</resources>
As per the official docs, you need to also declare the attributes without the android: namespace. In your case, those attributes are only getting applied to the native implementation.

Categories

Resources