|
|
|
@ -43,6 +43,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
|
private SwitchCompat swPull;
|
|
|
|
|
private SwitchCompat swAutoScroll;
|
|
|
|
|
private SwitchCompat swSwipeNav;
|
|
|
|
|
private SwitchCompat swSwipeReversed;
|
|
|
|
|
private SwitchCompat swDoubleTap;
|
|
|
|
|
private SwitchCompat swExpandRead;
|
|
|
|
|
private SwitchCompat swAutoExpand;
|
|
|
|
@ -55,7 +56,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
|
private SwitchCompat swDisableTracking;
|
|
|
|
|
|
|
|
|
|
private final static String[] RESET_OPTIONS = new String[]{
|
|
|
|
|
"pull", "autoscroll", "swipenav", "doubletap", "expand_read", "autoexpand", "autoclose", "onclose",
|
|
|
|
|
"pull", "autoscroll", "swipenav", "swipe_reversed", "doubletap", "expand_read", "autoexpand", "autoclose", "onclose",
|
|
|
|
|
"collapse", "autoread", "automove", "discard_delete", "disable_tracking"
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
@ -72,6 +73,7 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
|
swPull = view.findViewById(R.id.swPull);
|
|
|
|
|
swAutoScroll = view.findViewById(R.id.swAutoScroll);
|
|
|
|
|
swSwipeNav = view.findViewById(R.id.swSwipeNav);
|
|
|
|
|
swSwipeReversed = view.findViewById(R.id.swSwipeReversed);
|
|
|
|
|
swDoubleTap = view.findViewById(R.id.swDoubleTap);
|
|
|
|
|
swExpandRead = view.findViewById(R.id.swExpandRead);
|
|
|
|
|
swAutoExpand = view.findViewById(R.id.swAutoExpand);
|
|
|
|
@ -107,6 +109,14 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
|
@Override
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
prefs.edit().putBoolean("swipenav", checked).apply();
|
|
|
|
|
swSwipeReversed.setEnabled(checked);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
swSwipeReversed.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
prefs.edit().putBoolean("swipe_reversed", checked).apply();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -240,6 +250,8 @@ public class FragmentOptionsBehavior extends FragmentBase implements SharedPrefe
|
|
|
|
|
swPull.setChecked(prefs.getBoolean("pull", true));
|
|
|
|
|
swAutoScroll.setChecked(prefs.getBoolean("autoscroll", false));
|
|
|
|
|
swSwipeNav.setChecked(prefs.getBoolean("swipenav", true));
|
|
|
|
|
swSwipeReversed.setChecked(prefs.getBoolean("swipe_reversed", false));
|
|
|
|
|
swSwipeReversed.setEnabled(swSwipeNav.isChecked());
|
|
|
|
|
swDoubleTap.setChecked(prefs.getBoolean("doubletap", false));
|
|
|
|
|
swExpandRead.setChecked(prefs.getBoolean("expand_read", true));
|
|
|
|
|
swAutoExpand.setChecked(prefs.getBoolean("autoexpand", true));
|
|
|
|
|