效果图:
未选中状态:
选中状态:
使用步骤:
1.创建自己的selector
2.在style中加入自己的复选框的样式:
@drawable/mycheckboxselector
3.在自己的checkbox上设置style属性:
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context="com.example.testcheckboxlogo.MainActivity" >
android:id="@+id/cb_main"
style="@style/mycheckbox"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:text="自己的复选框" />
图片资源:
可以右键另存在电脑上
版权声明:本文为博主原创文章,未经博主允许不得转载。
原文:http://blog.csdn.net/u010399316/article/details/47184773