xiazai_checkbox.xml

android小功能:checkbox使用自己的背景点击切换背景
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android" >
    <item android:state_selected="true"  android:drawable="@drawable/hookicon_repost_pressed"></item>
    <item android:state_checked="true" android:drawable="@drawable/hookicon_repost_pressed"></item>
    <item android:state_pressed="true" android:drawable="@drawable/hookicon_repost_pressed"></item>
    <item android:drawable="@drawable/ic_checkbox_normal"></item>
</selector>
android小功能:checkbox使用自己的背景点击切换背景
android小功能:checkbox使用自己的背景点击切换背景
 <CheckBox
      android:id="@+id/xiazai_checkbox"
      android:layout_width="25dp"
      android:layout_height="25dp"
      android:layout_alignParentRight="true"
      android:layout_alignParentTop="true"
      android:layout_marginRight="30dp" 
      android:layout_marginTop="10dp"
      android:button="@null"
      android:background="@drawable/xiazai_checkbox"
      />
android小功能:checkbox使用自己的背景点击切换背景

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-06-20
  • 2021-10-19
  • 2021-12-27
  • 2021-08-28
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-05-02
相关资源
相似解决方案