Why does android dropdown menu of action bar look different on Lollipop? -
i building android app, after months of developing got stuck in seems silly problem.
the problem have dropdown menu (coming action bar) looks according styles.xml dark text above white backgroud. testing application on different devices, have noticed on lollipop same dropdown menu looks dark text on dark background making way text impossible read.
i thought "issue" related folders "values-v11" , "values-v14" , respective styles.xml under raw directory. tried play bit files copying or of settings have in main styles.xml got no result.
this how styles.xml file looks like:
<resources xmlns:android="http://schemas.android.com/apk/res/android"> <!-- base application theme, dependent on api level. theme replaced appbasetheme res/values-vxx/styles.xml on newer devices. --> <style name="appbasetheme" parent="android:theme.light"> <!-- theme customizations available in newer api levels can go in res/values-vxx/styles.xml, while customizations related backward-compatibility can go here. --> </style> <!-- application theme. --> <style name="apptheme" parent="appbasetheme"> <item name="android:actionbarstyle">@style/myactionbar</item> <item name="android:actionbartabstyle">@style/myactionbar.tab</item> <item name="android:actionbartabbarstyle">@style/myactionbar.tabbar</item> <item name="android:icon">@android:color/transparent</item> <item name="android:homeasupindicator">@drawable/ic_back_arrow</item> <item name="android:popupmenustyle">@android:style/widget.holo.popupmenu</item> <item name="android:actionbarwidgettheme">@style/myactionbarwidget</item> <item name="android:dropdownlistviewstyle">@android:style/widget.holo.light.listview.dropdown</item> </style> <style name="myactionbarwidget" parent="android:theme.holo.light"> <item name="android:popupmenustyle">@android:style/widget.holo.light.popupmenu</item> <item name="android:dropdownlistviewstyle">@android:style/widget.holo.light.listview.dropdown</item> </style> <style name="myactionbar" parent="@android:style/widget.holo.light.actionbar"> <item name="android:background">@color/actionbar_background</item> <item name="android:titletextstyle">@style/theme.myapptheme.actionbar.titletextstyle</item> <item name="android:subtitletextstyle">@style/theme.myapptheme.actionbar.subtitletextstyle</item> </style> <style name="myactionbar.tab"> <item name="android:background">@drawable/tab_bar_background</item> <item name="android:gravity">center</item> </style> <style name="myactionbar.tabbar"> <item name="android:background">@color/actionbar_background</item> </style> <style name="theme.myapptheme.actionbar.titletextstyle" parent="android:style/textappearance.holo.widget.actionbar.title"> <item name="android:textcolor">@color/white</item> </style> <style name="theme.myapptheme.actionbar.subtitletextstyle" parent="android:style/textappearance.holo.widget.actionbar.subtitle"> <item name="android:textcolor">@color/white</item> </style>
after "refreshing mind" on holidays couple of weeks, once realised creating issue:
there 2 conflicting definitions <item name="android:popupmenustyle"> 1 inside "apptheme" @android:style/widget.holo.popupmenu 1 inside "myactionbarwidget" @android:style/widget.holo.light.popupmenu
lollipop devices picking 1 under "apptheme", problem has been sorted getting rid of , leaving 1 under "myactionbarwidget".
Comments
Post a Comment