Added option to disable pull down to refresh

This commit is contained in:
M66B
2019-01-03 12:14:14 +01:00
parent a280d034ec
commit 558eec538f
5 changed files with 41 additions and 10 deletions

View File

@@ -68,6 +68,7 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
private SwitchCompat swLight;
private Button btnSound;
private SwitchCompat swPull;
private SwitchCompat swSwipe;
private SwitchCompat swActionbar;
private SwitchCompat swAutoClose;
@@ -106,6 +107,7 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
swLight = view.findViewById(R.id.swLight);
btnSound = view.findViewById(R.id.btnSound);
swPull = view.findViewById(R.id.swPull);
swSwipe = view.findViewById(R.id.swSwipe);
swActionbar = view.findViewById(R.id.swActionbar);
swAutoClose = view.findViewById(R.id.swAutoClose);
@@ -272,6 +274,14 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
}
});
swPull.setChecked(prefs.getBoolean("pull", true));
swPull.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("pull", checked).apply();
}
});
swSwipe.setChecked(prefs.getBoolean("swipe", true));
swSwipe.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override