|
|
@ -63,6 +63,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
private SwitchCompat swBeige;
|
|
|
|
private SwitchCompat swBeige;
|
|
|
|
private SwitchCompat swTabularBackground;
|
|
|
|
private SwitchCompat swTabularBackground;
|
|
|
|
private SwitchCompat swShadow;
|
|
|
|
private SwitchCompat swShadow;
|
|
|
|
|
|
|
|
private SwitchCompat swShadowHighlight;
|
|
|
|
private SwitchCompat swDate;
|
|
|
|
private SwitchCompat swDate;
|
|
|
|
private SwitchCompat swDateFixed;
|
|
|
|
private SwitchCompat swDateFixed;
|
|
|
|
private SwitchCompat swDateBold;
|
|
|
|
private SwitchCompat swDateBold;
|
|
|
@ -159,7 +160,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
private NumberFormat NF = NumberFormat.getNumberInstance();
|
|
|
|
private NumberFormat NF = NumberFormat.getNumberInstance();
|
|
|
|
|
|
|
|
|
|
|
|
private final static String[] RESET_OPTIONS = new String[]{
|
|
|
|
private final static String[] RESET_OPTIONS = new String[]{
|
|
|
|
"theme", "startup", "cards", "beige", "tabular_card_bg", "shadow_unread",
|
|
|
|
"theme", "startup", "cards", "beige", "tabular_card_bg", "shadow_unread", "shadow_highlight",
|
|
|
|
"date", "date_fixed", "date_bold",
|
|
|
|
"date", "date_fixed", "date_bold",
|
|
|
|
"portrait2", "portrait2c", "landscape", "nav_options", "nav_count", "nav_unseen_drafts", "navbar_colorize",
|
|
|
|
"portrait2", "portrait2c", "landscape", "nav_options", "nav_count", "nav_unseen_drafts", "navbar_colorize",
|
|
|
|
"threading", "threading_unread", "indentation", "seekbar", "actionbar", "actionbar_color",
|
|
|
|
"threading", "threading_unread", "indentation", "seekbar", "actionbar", "actionbar_color",
|
|
|
@ -194,6 +195,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
swBeige = view.findViewById(R.id.swBeige);
|
|
|
|
swBeige = view.findViewById(R.id.swBeige);
|
|
|
|
swTabularBackground = view.findViewById(R.id.swTabularCardBackground);
|
|
|
|
swTabularBackground = view.findViewById(R.id.swTabularCardBackground);
|
|
|
|
swShadow = view.findViewById(R.id.swShadow);
|
|
|
|
swShadow = view.findViewById(R.id.swShadow);
|
|
|
|
|
|
|
|
swShadowHighlight = view.findViewById(R.id.swShadowHighlight);
|
|
|
|
swDate = view.findViewById(R.id.swDate);
|
|
|
|
swDate = view.findViewById(R.id.swDate);
|
|
|
|
swDateFixed = view.findViewById(R.id.swDateFixed);
|
|
|
|
swDateFixed = view.findViewById(R.id.swDateFixed);
|
|
|
|
swDateBold = view.findViewById(R.id.swDateBold);
|
|
|
|
swDateBold = view.findViewById(R.id.swDateBold);
|
|
|
@ -321,6 +323,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
swBeige.setEnabled(checked);
|
|
|
|
swBeige.setEnabled(checked);
|
|
|
|
swTabularBackground.setEnabled(!checked);
|
|
|
|
swTabularBackground.setEnabled(!checked);
|
|
|
|
swShadow.setEnabled(checked);
|
|
|
|
swShadow.setEnabled(checked);
|
|
|
|
|
|
|
|
swShadowHighlight.setEnabled(swShadow.isEnabled() && checked);
|
|
|
|
swIndentation.setEnabled(checked);
|
|
|
|
swIndentation.setEnabled(checked);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
@ -344,6 +347,14 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
prefs.edit().putBoolean("shadow_unread", checked).apply();
|
|
|
|
prefs.edit().putBoolean("shadow_unread", checked).apply();
|
|
|
|
|
|
|
|
swShadowHighlight.setEnabled(swShadow.isEnabled() && checked);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
swShadowHighlight.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
|
|
|
prefs.edit().putBoolean("shadow_highlight", checked).apply();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
@ -1071,9 +1082,11 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
swBeige.setChecked(prefs.getBoolean("beige", true));
|
|
|
|
swBeige.setChecked(prefs.getBoolean("beige", true));
|
|
|
|
swTabularBackground.setChecked(prefs.getBoolean("tabular_card_bg", false));
|
|
|
|
swTabularBackground.setChecked(prefs.getBoolean("tabular_card_bg", false));
|
|
|
|
swShadow.setChecked(prefs.getBoolean("shadow_unread", false));
|
|
|
|
swShadow.setChecked(prefs.getBoolean("shadow_unread", false));
|
|
|
|
|
|
|
|
swShadowHighlight.setChecked(prefs.getBoolean("shadow_highlight", false));
|
|
|
|
swBeige.setEnabled(swCards.isChecked());
|
|
|
|
swBeige.setEnabled(swCards.isChecked());
|
|
|
|
swTabularBackground.setEnabled(!swCards.isChecked());
|
|
|
|
swTabularBackground.setEnabled(!swCards.isChecked());
|
|
|
|
swShadow.setEnabled(swCards.isChecked());
|
|
|
|
swShadow.setEnabled(swCards.isChecked());
|
|
|
|
|
|
|
|
swShadowHighlight.setEnabled(swShadow.isEnabled() && swShadow.isChecked());
|
|
|
|
swDate.setChecked(prefs.getBoolean("date", true));
|
|
|
|
swDate.setChecked(prefs.getBoolean("date", true));
|
|
|
|
swDateFixed.setChecked(prefs.getBoolean("date_fixed", false));
|
|
|
|
swDateFixed.setChecked(prefs.getBoolean("date_fixed", false));
|
|
|
|
swDateFixed.setEnabled(!swDate.isChecked());
|
|
|
|
swDateFixed.setEnabled(!swDate.isChecked());
|
|
|
|