先看效果图: <?xml version="1.0" encoding="utf-8"?> <selector xmlns:android="http://schemas.android.com/apk/res/android"> <item android:state_checked="false"> <shape> <corners android:radius="5dp"/> <solid android:color="@color/zi_be"/> </shape> </item> <item android:state_checked="true"> <layer-list> <item> <shape> <corners android:radius="5dp" /> <solid android:color="@color/bai_ff" /> <stroke android:width="1dp" android:color="@color/zi_be" /> </shape> </item> <!-- 2.对勾--> <item android:right="9dp"> <bitmap android:src="@drawable/grade3" android:gravity="center_vertical|right" /> </item> </layer-list> </item> </selector>
selector加layer-list的用法
最新推荐文章于 2021-06-29 11:42:56 发布