|
|
@ -85,7 +85,6 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
private SwitchCompat swNameEmail;
|
|
|
|
private SwitchCompat swNameEmail;
|
|
|
|
private SwitchCompat swPreferContact;
|
|
|
|
private SwitchCompat swPreferContact;
|
|
|
|
private SwitchCompat swDistinguishContacts;
|
|
|
|
private SwitchCompat swDistinguishContacts;
|
|
|
|
private SwitchCompat swAuthentication;
|
|
|
|
|
|
|
|
private SwitchCompat swSubjectTop;
|
|
|
|
private SwitchCompat swSubjectTop;
|
|
|
|
private Spinner spFontSizeSender;
|
|
|
|
private Spinner spFontSizeSender;
|
|
|
|
private Spinner spFontSizeSubject;
|
|
|
|
private Spinner spFontSizeSubject;
|
|
|
@ -108,16 +107,19 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
private SwitchCompat swImagesInline;
|
|
|
|
private SwitchCompat swImagesInline;
|
|
|
|
private SwitchCompat swAttachmentsAlt;
|
|
|
|
private SwitchCompat swAttachmentsAlt;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private SwitchCompat swAuthentication;
|
|
|
|
|
|
|
|
|
|
|
|
private final static String[] RESET_OPTIONS = new String[]{
|
|
|
|
private final static String[] RESET_OPTIONS = new String[]{
|
|
|
|
"theme", "startup", "cards", "date", "navbar_colorize", "landscape", "landscape3",
|
|
|
|
"theme", "startup", "cards", "date", "navbar_colorize", "landscape", "landscape3",
|
|
|
|
"threading", "indentation", "seekbar", "actionbar",
|
|
|
|
"threading", "indentation", "seekbar", "actionbar",
|
|
|
|
"highlight_unread", "color_stripe",
|
|
|
|
"highlight_unread", "color_stripe",
|
|
|
|
"avatars", "gravatars", "generated_icons", "identicons", "circular", "saturation", "brightness", "threshold",
|
|
|
|
"avatars", "gravatars", "generated_icons", "identicons", "circular", "saturation", "brightness", "threshold",
|
|
|
|
"name_email", "prefer_contact", "distinguish_contacts", "authentication",
|
|
|
|
"name_email", "prefer_contact", "distinguish_contacts",
|
|
|
|
"subject_top", "font_size_sender", "font_size_subject", "subject_italic", "highlight_subject", "subject_ellipsize",
|
|
|
|
"subject_top", "font_size_sender", "font_size_subject", "subject_italic", "highlight_subject", "subject_ellipsize",
|
|
|
|
"keywords_header", "flags", "flags_background", "preview", "preview_italic", "preview_lines", "addresses",
|
|
|
|
"keywords_header", "flags", "flags_background", "preview", "preview_italic", "preview_lines", "addresses",
|
|
|
|
"contrast", "monospaced", "text_color", "text_size",
|
|
|
|
"contrast", "monospaced", "text_color", "text_size",
|
|
|
|
"inline_images", "collapse_quotes", "attachments_alt"
|
|
|
|
"inline_images", "collapse_quotes", "attachments_alt",
|
|
|
|
|
|
|
|
"authentication"
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
@ -160,7 +162,6 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
swNameEmail = view.findViewById(R.id.swNameEmail);
|
|
|
|
swNameEmail = view.findViewById(R.id.swNameEmail);
|
|
|
|
swPreferContact = view.findViewById(R.id.swPreferContact);
|
|
|
|
swPreferContact = view.findViewById(R.id.swPreferContact);
|
|
|
|
swDistinguishContacts = view.findViewById(R.id.swDistinguishContacts);
|
|
|
|
swDistinguishContacts = view.findViewById(R.id.swDistinguishContacts);
|
|
|
|
swAuthentication = view.findViewById(R.id.swAuthentication);
|
|
|
|
|
|
|
|
swSubjectTop = view.findViewById(R.id.swSubjectTop);
|
|
|
|
swSubjectTop = view.findViewById(R.id.swSubjectTop);
|
|
|
|
spFontSizeSender = view.findViewById(R.id.spFontSizeSender);
|
|
|
|
spFontSizeSender = view.findViewById(R.id.spFontSizeSender);
|
|
|
|
spFontSizeSubject = view.findViewById(R.id.spFontSizeSubject);
|
|
|
|
spFontSizeSubject = view.findViewById(R.id.spFontSizeSubject);
|
|
|
@ -181,6 +182,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
swCollapseQuotes = view.findViewById(R.id.swCollapseQuotes);
|
|
|
|
swCollapseQuotes = view.findViewById(R.id.swCollapseQuotes);
|
|
|
|
swImagesInline = view.findViewById(R.id.swImagesInline);
|
|
|
|
swImagesInline = view.findViewById(R.id.swImagesInline);
|
|
|
|
swAttachmentsAlt = view.findViewById(R.id.swAttachmentsAlt);
|
|
|
|
swAttachmentsAlt = view.findViewById(R.id.swAttachmentsAlt);
|
|
|
|
|
|
|
|
swAuthentication = view.findViewById(R.id.swAuthentication);
|
|
|
|
|
|
|
|
|
|
|
|
setOptions();
|
|
|
|
setOptions();
|
|
|
|
|
|
|
|
|
|
|
@ -421,13 +423,6 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
swAuthentication.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
|
|
|
prefs.edit().putBoolean("authentication", checked).apply();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
swSubjectTop.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
swSubjectTop.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
@ -595,6 +590,13 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
swAuthentication.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
|
|
|
prefs.edit().putBoolean("authentication", checked).apply();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
PreferenceManager.getDefaultSharedPreferences(getContext()).registerOnSharedPreferenceChangeListener(this);
|
|
|
|
PreferenceManager.getDefaultSharedPreferences(getContext()).registerOnSharedPreferenceChangeListener(this);
|
|
|
|
|
|
|
|
|
|
|
|
return view;
|
|
|
|
return view;
|
|
|
@ -688,8 +690,6 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
swNameEmail.setChecked(prefs.getBoolean("name_email", false));
|
|
|
|
swNameEmail.setChecked(prefs.getBoolean("name_email", false));
|
|
|
|
swPreferContact.setChecked(prefs.getBoolean("prefer_contact", 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));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
swSubjectTop.setChecked(prefs.getBoolean("subject_top", false));
|
|
|
|
swSubjectTop.setChecked(prefs.getBoolean("subject_top", false));
|
|
|
|
|
|
|
|
|
|
|
|
int[] fontSizeValues = getResources().getIntArray(R.array.fontSizeValues);
|
|
|
|
int[] fontSizeValues = getResources().getIntArray(R.array.fontSizeValues);
|
|
|
@ -736,6 +736,8 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
swImagesInline.setChecked(prefs.getBoolean("inline_images", false));
|
|
|
|
swImagesInline.setChecked(prefs.getBoolean("inline_images", false));
|
|
|
|
swAttachmentsAlt.setChecked(prefs.getBoolean("attachments_alt", false));
|
|
|
|
swAttachmentsAlt.setChecked(prefs.getBoolean("attachments_alt", false));
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
swAuthentication.setChecked(prefs.getBoolean("authentication", true));
|
|
|
|
|
|
|
|
|
|
|
|
updateColor();
|
|
|
|
updateColor();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|