|
|
@ -75,6 +75,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
private SeekBar sbBrightness;
|
|
|
|
private SeekBar sbBrightness;
|
|
|
|
private SeekBar sbThreshold;
|
|
|
|
private SeekBar sbThreshold;
|
|
|
|
private SwitchCompat swNameEmail;
|
|
|
|
private SwitchCompat swNameEmail;
|
|
|
|
|
|
|
|
private SwitchCompat swPreferContact;
|
|
|
|
private SwitchCompat swDistinguishContacts;
|
|
|
|
private SwitchCompat swDistinguishContacts;
|
|
|
|
private SwitchCompat swAuthentication;
|
|
|
|
private SwitchCompat swAuthentication;
|
|
|
|
private SwitchCompat swSubjectTop;
|
|
|
|
private SwitchCompat swSubjectTop;
|
|
|
@ -102,7 +103,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
private final static String[] RESET_OPTIONS = new String[]{
|
|
|
|
private final static String[] RESET_OPTIONS = new String[]{
|
|
|
|
"theme", "landscape", "landscape3", "startup", "cards", "indentation", "date", "threading", "highlight_unread", "color_stripe",
|
|
|
|
"theme", "landscape", "landscape3", "startup", "cards", "indentation", "date", "threading", "highlight_unread", "color_stripe",
|
|
|
|
"avatars", "gravatars", "generated_icons", "identicons", "circular", "saturation", "brightness", "threshold",
|
|
|
|
"avatars", "gravatars", "generated_icons", "identicons", "circular", "saturation", "brightness", "threshold",
|
|
|
|
"name_email", "distinguish_contacts", "authentication",
|
|
|
|
"name_email", "prefer_contact", "distinguish_contacts", "authentication",
|
|
|
|
"subject_top", "font_size_sender", "font_size_subject", "subject_italic", "subject_ellipsize", "keywords_header",
|
|
|
|
"subject_top", "font_size_sender", "font_size_subject", "subject_italic", "subject_ellipsize", "keywords_header",
|
|
|
|
"flags", "flags_background", "preview", "preview_italic", "preview_lines", "addresses", "attachments_alt",
|
|
|
|
"flags", "flags_background", "preview", "preview_italic", "preview_lines", "addresses", "attachments_alt",
|
|
|
|
"contrast", "monospaced", "text_color",
|
|
|
|
"contrast", "monospaced", "text_color",
|
|
|
@ -142,6 +143,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
sbBrightness = view.findViewById(R.id.sbBrightness);
|
|
|
|
sbBrightness = view.findViewById(R.id.sbBrightness);
|
|
|
|
sbThreshold = view.findViewById(R.id.sbThreshold);
|
|
|
|
sbThreshold = view.findViewById(R.id.sbThreshold);
|
|
|
|
swNameEmail = view.findViewById(R.id.swNameEmail);
|
|
|
|
swNameEmail = view.findViewById(R.id.swNameEmail);
|
|
|
|
|
|
|
|
swPreferContact = view.findViewById(R.id.swPreferContact);
|
|
|
|
swDistinguishContacts = view.findViewById(R.id.swDistinguishContacts);
|
|
|
|
swDistinguishContacts = view.findViewById(R.id.swDistinguishContacts);
|
|
|
|
swAuthentication = view.findViewById(R.id.swAuthentication);
|
|
|
|
swAuthentication = view.findViewById(R.id.swAuthentication);
|
|
|
|
swSubjectTop = view.findViewById(R.id.swSubjectTop);
|
|
|
|
swSubjectTop = view.findViewById(R.id.swSubjectTop);
|
|
|
@ -367,6 +369,13 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
swPreferContact.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
|
|
|
prefs.edit().putBoolean("prefer_contact", checked).apply();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
swDistinguishContacts.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
swDistinguishContacts.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
@ -632,6 +641,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
sbThreshold.setEnabled(swGeneratedIcons.isChecked());
|
|
|
|
sbThreshold.setEnabled(swGeneratedIcons.isChecked());
|
|
|
|
|
|
|
|
|
|
|
|
swNameEmail.setChecked(prefs.getBoolean("name_email", false));
|
|
|
|
swNameEmail.setChecked(prefs.getBoolean("name_email", false));
|
|
|
|
|
|
|
|
swPreferContact.setChecked(prefs.getBoolean("prefer_contact", false));
|
|
|
|
swDistinguishContacts.setChecked(prefs.getBoolean("distinguish_contacts", false));
|
|
|
|
swDistinguishContacts.setChecked(prefs.getBoolean("distinguish_contacts", false));
|
|
|
|
swAuthentication.setChecked(prefs.getBoolean("authentication", true));
|
|
|
|
swAuthentication.setChecked(prefs.getBoolean("authentication", true));
|
|
|
|
|
|
|
|
|
|
|
|