|
|
|
@ -48,6 +48,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
private SwitchCompat swCards;
|
|
|
|
|
private SwitchCompat swDate;
|
|
|
|
|
private SwitchCompat swThreading;
|
|
|
|
|
private SwitchCompat swIndentation;
|
|
|
|
|
private SwitchCompat swHighlightUnread;
|
|
|
|
|
private SwitchCompat swAvatars;
|
|
|
|
|
private SwitchCompat swGeneratedIcons;
|
|
|
|
@ -75,7 +76,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
private SwitchCompat swActionbar;
|
|
|
|
|
|
|
|
|
|
private final static String[] RESET_OPTIONS = new String[]{
|
|
|
|
|
"theme", "startup", "cards", "date", "threading", "highlight_unread",
|
|
|
|
|
"theme", "startup", "cards", "date", "threading", "indentation", "highlight_unread",
|
|
|
|
|
"avatars", "generated_icons", "identicons", "circular", "name_email", "distinguish_contacts", "authentication",
|
|
|
|
|
"subject_top", "subject_italic", "subject_ellipsize",
|
|
|
|
|
"flags", "flags_background", "preview", "preview_italic", "addresses", "attachments_alt",
|
|
|
|
@ -98,6 +99,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
swCards = view.findViewById(R.id.swCards);
|
|
|
|
|
swDate = view.findViewById(R.id.swDate);
|
|
|
|
|
swThreading = view.findViewById(R.id.swThreading);
|
|
|
|
|
swIndentation = view.findViewById(R.id.swIndentation);
|
|
|
|
|
swHighlightUnread = view.findViewById(R.id.swHighlightUnread);
|
|
|
|
|
swAvatars = view.findViewById(R.id.swAvatars);
|
|
|
|
|
swGeneratedIcons = view.findViewById(R.id.swGeneratedIcons);
|
|
|
|
@ -171,6 +173,13 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
swIndentation.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
prefs.edit().putBoolean("indentation", checked).apply();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
swHighlightUnread.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
@ -410,6 +419,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
swCards.setChecked(prefs.getBoolean("cards", true));
|
|
|
|
|
swDate.setChecked(prefs.getBoolean("date", true));
|
|
|
|
|
swThreading.setChecked(prefs.getBoolean("threading", true));
|
|
|
|
|
swIndentation.setChecked(prefs.getBoolean("indentation", true));
|
|
|
|
|
swHighlightUnread.setChecked(prefs.getBoolean("highlight_unread", false));
|
|
|
|
|
swAvatars.setChecked(prefs.getBoolean("avatars", true));
|
|
|
|
|
swGeneratedIcons.setChecked(prefs.getBoolean("generated_icons", true));
|
|
|
|
|