android - actionBarTheme conflicts with popupMenuStyle -


i noticed when setting background in actionbartheme style attribute setting background in popupmenustyle style attribute :

<style name="apptheme" parent="@style/theme.appcompat.light">     <item name="actionbartheme">@style/myactionbartheme</item>     <item name="android:actionbartheme">@style/myactionbartheme</item>     <item name="android:popupmenustyle">@style/mypopupmenu</item>     <item name="popupmenustyle">@style/mypopupmenu</item> </style>  <style name="myactionbartheme" parent="@style/themeoverlay.appcompat.actionbar">     <item name="background">@drawable/action_bar_background</item>     <item name="android:background">@drawable/action_bar_background</item> </style>  <style name="mypopupmenu" parent="@style/widget.appcompat.listpopupwindow">     <item name="android:popupbackground">@drawable/menu_dropdown_panel_example</item> </style> 

the background in actionbartheme effects actionbar text in each menu option.

enter image description here

any idea how solve ? thanks.

i face same issue while using toolbar. fixed this.

<android.support.v7.widget.toolbar                           xmlns:android="http://schemas.android.com/apk/res/android"         xmlns:app="http://schemas.android.com/apk/res-auto"         android:id="@+id/toolbar"         android:layout_width="match_parent"         android:layout_height="?attr/actionbarsize"         android:background="?attr/themeddarktoolbarbackgroundcolor"         android:titletextappearance="@color/white"         app:popuptheme="@style/menuthemedark"/> 

use style this

     <style name="menuthemedark" parent="@style/themeoverlay.appcompat.light">         <item name="android:textcolor">@color/darkthemeconslisttitlename</item>         <item name="android:colorbackground">@color/darkthemecolorbackground</item>     </style> 

Comments

Popular posts from this blog

sequelize.js - Sequelize group by with association includes id -

android - Robolectric "INTERNET permission is required" -

java - Android raising EPERM (Operation not permitted) when attempting to send UDP packet after network connection -