<? The XML version = "1.0" encoding = "utf-8"? > <selector xmlns:tools="http://schemas.android.com/tools" xmlns:android="http://schemas.android.com/apk/res/android" tools:ignore="MissingDefaultResource"> <item android:state_enabled="false"> <shape android:shape="rectangle"> <solid android:color="#CCCCCC"/> <corners android:radius="2dp"/> </shape> </item> <item android:state_enabled="true"> <shape android:shape="rectangle"> <solid android:color="#333333"/> <corners android:radius="2dp"/> </shape> </item> </selector>Copy the code