hualuoshuijia
<Switch
        android:layout_width="wrap_content"
        android:layout_height="@dimen/minCellHeight"
        android:checked="true"
        android:button="@null"
        android:thumb="@null"
        android:background="@drawable/switch_btn"/>

 

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
    <item
            android:drawable="@mipmap/enable"
             android:state_checked="true"/>
    <item
             android:drawable="@mipmap/noenable"
             android:state_checked="false"/>
    <item
           android:drawable="@mipmap/enable"/>
</selector>

 

 

效果图就是图片的效果,以上图片可以直接拿来用

android:thumb="@null"这句功能只要是屏蔽android自带的效果图片

分类:

技术点:

相关文章:

  • 2022-12-23
  • 2021-11-20
  • 2022-12-23
  • 2021-12-27
  • 2021-06-28
  • 2021-12-27
  • 2022-12-23
  • 2021-12-25
猜你喜欢
  • 2021-12-27
  • 2021-12-27
  • 2021-12-27
  • 2021-08-15
  • 2021-07-23
  • 2021-12-27
  • 2021-12-23
相关资源
相似解决方案