在android studio使用selector设置字体颜色时须使用android:color
<item android:color="@color/white" android:state_pressed="true"/> <item android:color="@color/black" android:state_pressed="false"/>
设置背景时可以android:color或android:drawable都可
<item android:drawable="@color/chengse" android:state_pressed="true"/>
<item android:drawable="@drawable/biankuang_chengse" android:state_pressed="false"/>