Added option to disable previous/next navigation

This commit is contained in:
M66B
2018-11-02 19:37:44 +00:00
parent d8af4cb378
commit f82be4777d
6 changed files with 25 additions and 3 deletions

View File

@@ -38,6 +38,7 @@ public class FragmentOptions extends FragmentEx {
private SwitchCompat swBrowse;
private SwitchCompat swSwipe;
private SwitchCompat swCompact;
private SwitchCompat swNav;
private SwitchCompat swInsecure;
private SwitchCompat swDebug;
@@ -55,6 +56,7 @@ public class FragmentOptions extends FragmentEx {
swBrowse = view.findViewById(R.id.swBrowse);
swSwipe = view.findViewById(R.id.swSwipe);
swCompact = view.findViewById(R.id.swCompact);
swNav = view.findViewById(R.id.swNav);
swInsecure = view.findViewById(R.id.swInsecure);
swDebug = view.findViewById(R.id.swDebug);
@@ -114,6 +116,14 @@ public class FragmentOptions extends FragmentEx {
}
});
swNav.setChecked(prefs.getBoolean("navigation", true));
swNav.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("navigation", checked).apply();
}
});
swInsecure.setChecked(prefs.getBoolean("insecure", false));
swInsecure.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override