2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 13:47:41 +00:00

Use SwitchPreference on Android 7

This commit is contained in:
Albert Vaca 2018-10-25 20:56:39 +02:00
parent 20ad6a5ffc
commit 14d70df55c

View File

@ -29,8 +29,8 @@ public class SettingsFragment extends PreferenceFragmentCompat implements MainAc
}
TwoStatePreference createTwoStatePreferenceCompat(Context context) {
//The switch didn't work on Android 6, not sure about 7
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {
//SwitchPreference doesn't work on Android 6
if (Build.VERSION.SDK_INT > Build.VERSION_CODES.M) {
return new SwitchPreference(context);
} else {
return new CheckBoxPreference(context);