Change color of a disabled spinner Android
Create a color folder in res and create a color state my_text_color.xml
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@color/disableColor" android:state_enabled="false"/>
<item android:color="@color/enableColor"/>
</selector>
and your textview look like
<TextView
android:textColor="@color/my_text_color"
In adapter you need to inflate the layout that contain the Textview. Inside your adapter constructor, send the id of textview also
public CustomAdapter(Activity context,int resouceId, int textviewId, List<RowItem> list){
super(context,resouceId,textviewId, list);
flater = context.getLayoutInflater();
}
call it by
CustomAdapter adapter = new CustomAdapter(MainActivity.this,
R.layout.listitems_layout, R.id.title, rowItems);
<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>
<EditText
android:id="@+id/customEditText"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:enabled="false"
android:text="Hello!"
android:textColor="@drawable/edit_text_selector" />
// first code used in drawable/edit_text_selector.xml