如何去除Android 5.1.1中切换按钮状态改变时出现的灰色圆圈(如下图)?
Effect when Android's switch changes state
最佳答案
您需要设置开关的背景以禁用波纹效果。在我的例子中,我设置了 background 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"/>
关于android - 当切换按钮在android中更改状态时如何删除效果,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34626954/