<selector xmlns:android="http://schemas.android.com/apk/res/android><item android;drawable="@drawable/bluebtn" android: state_enabled="false"/> code example

Example:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:tools="http://schemas.android.com/tools"
        android:id="@+id/myLayout"
        android:layout_width="fill_parent"
        android:layout_height="fill_parent" >

        <Button
            android:id="@+id/button1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:layout_alignParentLeft="true"
            android:layout_alignParentTop="true"
            android:layout_marginLeft="64dp"
            android:layout_marginTop="71dp"
            android:text="changeColor" />

    </LinearLayout>

Tags:

Java Example