android - How to change the default disabled EditText's style? -
it isn't looking nice when using edittext enabled="false". how can change automatically of controls?
i've added image reference.
can me? thanks.
in color file define color:
<?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_enabled="false" android:color="@color/disabled_color" /> <item android:color="@color/normal_color"/> </selector>
in layout:
<edittext android:text="whatever text want" android:layout_width="wrap_content" android:layout_height="wrap_content" android:textcolor="@color/example" /> </edittext>
Comments
Post a Comment