selector of text and background should using different attributes

selector of text color:

you should use android:color="@color/white"
not android:color="@drawable/white"

selector of background:

you should use android:color="@drawable/white"
not android:color="@color/white"

Because of this, I waste a whole night to figure out the inflation exception.

Reference: https://developer.android.com/guide/topics/resources/color-list-resource.html

你可能感兴趣的:(Android,android)