android之4.0控件switch自定义开关滑块、滑块轨道和宽度
16lz
2021-12-04
区分一下概念:
1.android:background view背景
2.android:thumb 滑块 有选中状态 android:state_checked
3.android:track 滑块的轨道 有选中状态 android:state_checked
<Switch android:id="@+id/customer_gender" style="@style/widget_gender_switch" />
widget_gender_track.xml
<?xml version="1.0" encoding="utf-8"?>
参考http://stackoverflow.com/questions/20762490/how-to-change-height-and-width-of-switch-in-android
http://stackoverflow.com/questions/10173590/how-to-change-the-size-of-a-switch-widget
更多相关文章
- android去除状态栏和下面视图之前的黑线
- 获取Android状态栏的高度
- android 2.3 电源管理
- 获取Android状态栏的高度
- Android中getSystemService详解
- Android中shape的使用
- Android中shape的使用
- android 栈
- Android---沉浸式状态栏