主界面xml文件
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent" >
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:button="@drawable/check_selector"
android:checked="true" />
/res/drawable-hdpi/check_selector.xml
P.S:重点: android:button="@drawable/check_selector"
check_selector.xml中的checkok为CheckBox选中状态的图片,checkno为CheckBox未选中状态的图片.
总结
如果觉得编程之家网站内容还不错,欢迎将编程之家网站推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
小编个人微信号 jb51ccc
喜欢与人分享编程技术与工作经验,欢迎加入编程之家官方交流群!