android - Widget.AppCompat.Button colorButtonNormal shows gray -
i have values:styles.xml
with:
<style name="apptheme.button" parent="base.widget.appcompat.button"> <item name="colorbuttonnormal">@color/my_color</item> <item name="android:textcolor">@android:color/white</item> </style>
and values-v21:styles.xml
with:
<style name="apptheme.button" parent="base.widget.appcompat.button"> <item name="android:colorbuttonnormal">@color/my_color</item> <item name="android:textcolor">@android:color/white</item> </style>
and app style with
<style name="apptheme" parent="theme.appcompat.light.noactionbar"> <item name="android:buttonstyle">@style/apptheme.button</item> </style>
but colors appears grey instead of @color/my_color
to customize 1 button set android:theme="@style/apptheme.button" button.
<button ...... android:theme="@style/apptheme.button" ...... />
define style did in question
<style name="apptheme.button" parent="base.widget.appcompat.button"> ........ <item name="colorbuttonnormal">@color/my_color</item> ........ </style>
[edit]
see github demo here
Comments
Post a Comment