|
|
|
@ -106,6 +106,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
private SwitchCompat swGravatars;
|
|
|
|
|
private TextView tvGravatarsHint;
|
|
|
|
|
private SwitchCompat swFavicons;
|
|
|
|
|
private SwitchCompat swFaviconsPartial;
|
|
|
|
|
private TextView tvFaviconsHint;
|
|
|
|
|
private SwitchCompat swGeneratedIcons;
|
|
|
|
|
private SwitchCompat swIdenticons;
|
|
|
|
@ -182,7 +183,8 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
"nav_options", "nav_count", "nav_unseen_drafts", "navbar_colorize",
|
|
|
|
|
"threading", "threading_unread", "indentation", "seekbar", "actionbar", "actionbar_color",
|
|
|
|
|
"highlight_unread", "highlight_color", "color_stripe", "color_stripe_wide",
|
|
|
|
|
"avatars", "bimi", "gravatars", "favicons", "generated_icons", "identicons", "circular", "saturation", "brightness", "threshold",
|
|
|
|
|
"avatars", "bimi", "gravatars", "favicons", "favicons_partial", "generated_icons", "identicons",
|
|
|
|
|
"circular", "saturation", "brightness", "threshold",
|
|
|
|
|
"email_format", "prefer_contact", "only_contact", "distinguish_contacts", "show_recipients",
|
|
|
|
|
"font_size_sender", "sender_ellipsize",
|
|
|
|
|
"subject_top", "subject_italic", "highlight_subject", "font_size_subject", "subject_ellipsize",
|
|
|
|
@ -251,6 +253,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
swGravatars = view.findViewById(R.id.swGravatars);
|
|
|
|
|
tvGravatarsHint = view.findViewById(R.id.tvGravatarsHint);
|
|
|
|
|
swFavicons = view.findViewById(R.id.swFavicons);
|
|
|
|
|
swFaviconsPartial = view.findViewById(R.id.swFaviconsPartial);
|
|
|
|
|
tvFaviconsHint = view.findViewById(R.id.tvFaviconsHint);
|
|
|
|
|
swGeneratedIcons = view.findViewById(R.id.swGeneratedIcons);
|
|
|
|
|
swIdenticons = view.findViewById(R.id.swIdenticons);
|
|
|
|
@ -657,7 +660,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
@Override
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
prefs.edit().putBoolean("avatars", checked).apply();
|
|
|
|
|
ContactInfo.clearCache(getContext());
|
|
|
|
|
ContactInfo.clearCache(compoundButton.getContext());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -665,7 +668,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
@Override
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
prefs.edit().putBoolean("bimi", checked).apply();
|
|
|
|
|
ContactInfo.clearCache(getContext());
|
|
|
|
|
ContactInfo.clearCache(compoundButton.getContext());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -688,7 +691,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
@Override
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
prefs.edit().putBoolean("gravatars", checked).apply();
|
|
|
|
|
ContactInfo.clearCache(getContext());
|
|
|
|
|
ContactInfo.clearCache(compoundButton.getContext());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -704,7 +707,16 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
@Override
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
prefs.edit().putBoolean("favicons", checked).apply();
|
|
|
|
|
ContactInfo.clearCache(getContext());
|
|
|
|
|
swFaviconsPartial.setEnabled(checked);
|
|
|
|
|
ContactInfo.clearCache(compoundButton.getContext());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
swFaviconsPartial.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
|
|
|
|
|
@Override
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
prefs.edit().putBoolean("favicons_partial", checked).apply();
|
|
|
|
|
ContactInfo.clearCache(compoundButton.getContext());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -724,7 +736,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
sbSaturation.setEnabled(checked);
|
|
|
|
|
sbBrightness.setEnabled(checked);
|
|
|
|
|
sbThreshold.setEnabled(checked);
|
|
|
|
|
ContactInfo.clearCache(getContext());
|
|
|
|
|
ContactInfo.clearCache(compoundButton.getContext());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -732,7 +744,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
@Override
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
prefs.edit().putBoolean("identicons", checked).apply();
|
|
|
|
|
ContactInfo.clearCache(getContext());
|
|
|
|
|
ContactInfo.clearCache(compoundButton.getContext());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -741,7 +753,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
public void onCheckedChanged(CompoundButton compoundButton, boolean checked) {
|
|
|
|
|
prefs.edit().putBoolean("circular", checked).apply();
|
|
|
|
|
updateColor();
|
|
|
|
|
ContactInfo.clearCache(getContext());
|
|
|
|
|
ContactInfo.clearCache(compoundButton.getContext());
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
@ -750,7 +762,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
|
|
|
|
prefs.edit().putInt("saturation", progress).apply();
|
|
|
|
|
updateColor();
|
|
|
|
|
ContactInfo.clearCache(getContext());
|
|
|
|
|
ContactInfo.clearCache(seekBar.getContext());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -769,7 +781,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
|
|
|
|
prefs.edit().putInt("brightness", progress).apply();
|
|
|
|
|
updateColor();
|
|
|
|
|
ContactInfo.clearCache(getContext());
|
|
|
|
|
ContactInfo.clearCache(seekBar.getContext());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -788,7 +800,7 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
|
|
|
|
|
prefs.edit().putInt("threshold", progress).apply();
|
|
|
|
|
updateColor();
|
|
|
|
|
ContactInfo.clearCache(getContext());
|
|
|
|
|
ContactInfo.clearCache(seekBar.getContext());
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@ -1170,6 +1182,8 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
|
|
|
|
|
// Initialize
|
|
|
|
|
FragmentDialogTheme.setBackground(getContext(), view, false);
|
|
|
|
|
swFaviconsPartial.setText(getString(R.string.title_advanced_favicons_partial,
|
|
|
|
|
Helper.humanReadableByteCount(ContactInfo.FAVICON_READ_BYTES)));
|
|
|
|
|
grpGravatars.setVisibility(ContactInfo.canGravatars() ? View.VISIBLE : View.GONE);
|
|
|
|
|
tvBimiUnverified.setVisibility(BuildConfig.DEBUG ? View.VISIBLE : View.GONE);
|
|
|
|
|
|
|
|
|
@ -1279,6 +1293,8 @@ public class FragmentOptionsDisplay extends FragmentBase implements SharedPrefer
|
|
|
|
|
swBimi.setChecked(prefs.getBoolean("bimi", false));
|
|
|
|
|
swGravatars.setChecked(prefs.getBoolean("gravatars", false));
|
|
|
|
|
swFavicons.setChecked(prefs.getBoolean("favicons", false));
|
|
|
|
|
swFaviconsPartial.setChecked(prefs.getBoolean("favicons_partial", true));
|
|
|
|
|
swFaviconsPartial.setEnabled(swFavicons.isChecked());
|
|
|
|
|
swGeneratedIcons.setChecked(prefs.getBoolean("generated_icons", true));
|
|
|
|
|
swIdenticons.setChecked(prefs.getBoolean("identicons", false));
|
|
|
|
|
swIdenticons.setEnabled(swGeneratedIcons.isChecked());
|
|
|
|
|