android select选择器 checkbox改外观,button按下状态
android 可以用选择器。来加载视图。选择器里的选项也很多针对实际使用中用的几个进行描述。
1、button 的按下弹起改外观。选择器属性用 android:state_pressed
2、CheckBox 修改外观。可以替换系统的勾勾。选择器用属性android:state_checked
2.1 选择器
2.2 checkbox调用: 重写android:button 指定新外观
<CheckBox
android:id="@+id/chk_isSave"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:button="@drawable/select_ischeck"
/>
note: 没有属性行表示默认:
<item
android:drawable="@drawable/total_station_button" />