|
|
@ -53,6 +53,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
private SwitchCompat swIdenticons;
|
|
|
|
private SwitchCompat swIdenticons;
|
|
|
|
private SwitchCompat swCircular;
|
|
|
|
private SwitchCompat swCircular;
|
|
|
|
private SwitchCompat swNameEmail;
|
|
|
|
private SwitchCompat swNameEmail;
|
|
|
|
|
|
|
|
private SwitchCompat swSubjectTop;
|
|
|
|
private SwitchCompat swSubjectItalic;
|
|
|
|
private SwitchCompat swSubjectItalic;
|
|
|
|
private SwitchCompat swFlags;
|
|
|
|
private SwitchCompat swFlags;
|
|
|
|
private SwitchCompat swPreview;
|
|
|
|
private SwitchCompat swPreview;
|
|
|
@ -70,7 +71,8 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
private SwitchCompat swActionbar;
|
|
|
|
private SwitchCompat swActionbar;
|
|
|
|
|
|
|
|
|
|
|
|
private final static String[] RESET_OPTIONS = new String[]{
|
|
|
|
private final static String[] RESET_OPTIONS = new String[]{
|
|
|
|
"theme", "startup", "cards", "date", "threading", "highlight_unread", "avatars", "generated_icons", "identicons", "circular", "name_email", "subject_italic",
|
|
|
|
"theme", "startup", "cards", "date", "threading", "highlight_unread",
|
|
|
|
|
|
|
|
"avatars", "generated_icons", "identicons", "circular", "name_email", "subject_top", "subject_italic",
|
|
|
|
"flags", "preview", "preview_italic", "addresses", "attachments_alt",
|
|
|
|
"flags", "preview", "preview_italic", "addresses", "attachments_alt",
|
|
|
|
"contrast", "monospaced", "inline_images", "contact_images", "all_images", "collapse_quotes", "autocontent", "actionbar",
|
|
|
|
"contrast", "monospaced", "inline_images", "contact_images", "all_images", "collapse_quotes", "autocontent", "actionbar",
|
|
|
|
};
|
|
|
|
};
|
|
|
@ -96,6 +98,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
swIdenticons = view.findViewById(R.id.swIdenticons);
|
|
|
|
swIdenticons = view.findViewById(R.id.swIdenticons);
|
|
|
|
swCircular = view.findViewById(R.id.swCircular);
|
|
|
|
swCircular = view.findViewById(R.id.swCircular);
|
|
|
|
swNameEmail = view.findViewById(R.id.swNameEmail);
|
|
|
|
swNameEmail = view.findViewById(R.id.swNameEmail);
|
|
|
|
|
|
|
|
swSubjectTop = view.findViewById(R.id.swSubjectTop);
|
|
|
|
swSubjectItalic = view.findViewById(R.id.swSubjectItalic);
|
|
|
|
swSubjectItalic = view.findViewById(R.id.swSubjectItalic);
|
|
|
|
swFlags = view.findViewById(R.id.swFlags);
|
|
|
|
swFlags = view.findViewById(R.id.swFlags);
|
|
|
|
swPreview = view.findViewById(R.id.swPreview);
|
|
|
|
swPreview = view.findViewById(R.id.swPreview);
|
|
|
@ -205,6 +208,13 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
swSubjectTop.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
|
|
|
prefs.edit().putBoolean("subject_top", checked).apply();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
swSubjectItalic.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
swSubjectItalic.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
@ -369,6 +379,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
swIdenticons.setEnabled(swGeneratedIcons.isChecked());
|
|
|
|
swIdenticons.setEnabled(swGeneratedIcons.isChecked());
|
|
|
|
swCircular.setChecked(prefs.getBoolean("circular", true));
|
|
|
|
swCircular.setChecked(prefs.getBoolean("circular", true));
|
|
|
|
swNameEmail.setChecked(prefs.getBoolean("name_email", !compact));
|
|
|
|
swNameEmail.setChecked(prefs.getBoolean("name_email", !compact));
|
|
|
|
|
|
|
|
swSubjectTop.setChecked(prefs.getBoolean("subject_top", false));
|
|
|
|
swSubjectItalic.setChecked(prefs.getBoolean("subject_italic", true));
|
|
|
|
swSubjectItalic.setChecked(prefs.getBoolean("subject_italic", true));
|
|
|
|
swFlags.setChecked(prefs.getBoolean("flags", true));
|
|
|
|
swFlags.setChecked(prefs.getBoolean("flags", true));
|
|
|
|
swPreview.setChecked(prefs.getBoolean("preview", false));
|
|
|
|
swPreview.setChecked(prefs.getBoolean("preview", false));
|
|
|
|