Added option for automatically resizing of images

This commit is contained in:
M66B
2019-01-12 08:07:06 +00:00
parent 78e2b232d6
commit 9a8b9bb8f2
5 changed files with 32 additions and 5 deletions

View File

@@ -76,6 +76,7 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
private SwitchCompat swAutoMove;
private SwitchCompat swConfirm;
private SwitchCompat swSender;
private SwitchCompat swAutoResize;
private SwitchCompat swAutoSend;
private SwitchCompat swLight;
@@ -118,6 +119,7 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
swAutoMove = view.findViewById(R.id.swAutoMove);
swConfirm = view.findViewById(R.id.swConfirm);
swSender = view.findViewById(R.id.swSender);
swAutoResize = view.findViewById(R.id.swAutoResize);
swAutoSend = view.findViewById(R.id.swAutoSend);
swLight = view.findViewById(R.id.swLight);
@@ -348,6 +350,14 @@ public class FragmentOptions extends FragmentEx implements SharedPreferences.OnS
}
});
swAutoResize.setChecked(prefs.getBoolean("autoresize", true));
swAutoResize.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
prefs.edit().putBoolean("autoresize", checked).apply();
}
});
swAutoSend.setChecked(!prefs.getBoolean("autosend", false));
swAutoSend.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override