Android: Using Switch Preference pre API level 14

后端 未结 5 1661
有刺的猬
有刺的猬 2020-12-13 19:04

Pre-API Level 14 there is no switch preference. If I use preferences.xml to create my preference screen is there some way to distinguish between the API levels? So having a

5条回答
  •  南笙
    南笙 (楼主)
    2020-12-13 20:10

    You could also use the android-switch-backport library which has a SwitchPreference which works on Android 2.1+.

    https://github.com/BoD/android-switch-backport

提交回复
热议问题