答案 0 :(得分:0)
我认为您正在寻找的叫做“切换按钮”,请在此处https://developer.android.com/guide/topics/ui/controls/togglebutton
答案 1 :(得分:0)
这就是所谓的开关,其对API级别可用14+ https://developer.android.com/reference/android/widget/Switch
如果您要定位7级以上的API,可以使用SwitchCompat https://developer.android.com/reference/android/support/v7/widget/SwitchCompat