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. enter image description here

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

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -