Is there a way to change the color of a disabled button in an android through styles or some other form?
I currently have the following:
range hood / button _default.xml
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:drawable="@drawable/button_default_shape"/> </selector>
range hood / button _default_shape.xml
<?xml version="1.0" encoding="utf-8"?> <shape xmlns:android="http://schemas.android.com/apk/res/android" android:shape="rectangle"> <solid android:color="@color/button_default_background"/> <corners android:radius="3dp"/> </shape>
<strong> values /styles.xml
<style name="AppTheme.Button"> <item name="android:background">@drawable/button_default</item> <item name="android:textColor">@android:color/white</item> <item name="android:textAllCaps">false</item> <item name="android:paddingTop">10dp</item> <item name="android:paddingBottom">10dp</item> <item name="android:focusable">true</item> <item name="android:clickable">true</item> <item name="android:gravity">center</item> <item name="android:textStyle">bold</item> <item name="android:textSize">17sp</item> <item name="android:textAppearance">@style/CustomFontAppearance</item> </style>
android button android-drawable
nixgadgets
source share