android - How do I change color of RadioButtons in PopupMenu? -
how set color of radiobutton
s in checkable popupmenu
. using appcompat version. set background color , text color via styles, cannot figure out how set color of radio buttons.
this have far;
<style name="apptheme" parent="theme.appcompat.daynight.noactionbar"> <item name="popupmenustyle">@style/mypopupmenustyle</item> <item name="textappearancelargepopupmenu">@style/mypopupmenutextappearancelarge</item> <item name="textappearancesmallpopupmenu">@style/mypopupmenutextappearancesmall</item> </style> <style name="mypopupmenustyle" parent="widget.appcompat.popupmenu"> <item name="android:popupbackground">@color/accent</item> <item name="android:textcolor">@android:color/white</item> </style> <style name="mypopupmenutextappearancesmall" parent="textappearance.appcompat.widget.popupmenu.small"> <item name="android:textcolor">@android:color/white</item> </style> <style name="mypopupmenutextappearancelarge" parent="textappearance.appcompat.widget.popupmenu.large"> <item name="android:textcolor">@android:color/white</item> </style>
i have tried many other attributes, nothing helped.
<style name="apptheme" parent="theme.appcompat.daynight.noactionbar"> <item name="coloraccent">@color/radio_button_color</item> <item name="android:textcolorsecondary">@color/radio_button_color2</item> </style>
source: https://stackoverflow.com/a/26850668/1269953
coloraccent
primary color radio buttons, , textcolorsecondary
says secondary when radio button not selected. when using coloraccent
in appcompat
note there no android:
prefix correct way of using on versions below lollipop
Comments
Post a Comment