How to have a Lollipop switch button

后端 未结 7 1248
暖寄归人
暖寄归人 2021-02-04 02:05

I want to have the Lollipop style switch button for my app:

\"enter

How could I im

7条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-04 02:47

    There is a great article on the Android Developers Blog that discusses how to use material design on pre-Lollipop devices: http://android-developers.blogspot.com/2014/10/appcompat-v21-material-design-for-pre.html

    To more specifically answer your question, you can use the Lollipop style switch for older versions by using the SwitchCompat API: https://developer.android.com/reference/android/support/v7/widget/SwitchCompat.html

提交回复
热议问题