Chu*_*hoi 2 android button switch-statement
如何在开关按钮更改Android 5.1.1中的状态时删除出现的灰色圆圈(如下图所示)?
Android的开关改变状态时的效果
您需要设置Switch的背景以禁用涟漪效应.在我的情况下,我设置背景null来实现这一点.
<Switch
android:id="@+id/mySwitch"
android:layout_below="@+id/tvStateDefault"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textOn="ON"
android:thumb="@drawable/customswitchselector"
android:track="@drawable/custom_track"
android:showText="true"
android:textOff="OFF"
android:background="@null"
android:layout_centerHorizontal="true"/>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
1099 次 |
| 最近记录: |