Fixed typeface warnings on some Samsung devices

pull/156/head
M66B 6 years ago
parent 16bea88b20
commit ff0b4a2dc4

@ -132,7 +132,7 @@ public class AdapterAccount extends RecyclerView.Adapter<AdapterAccount.ViewHold
else else
tvName.setText(account.name); tvName.setText(account.name);
tvName.setTypeface(null, account.unseen > 0 ? Typeface.BOLD : Typeface.NORMAL); tvName.setTypeface(account.unseen > 0 ? Typeface.DEFAULT_BOLD : Typeface.DEFAULT);
tvName.setTextColor(account.unseen > 0 ? colorUnread : textColorSecondary); tvName.setTextColor(account.unseen > 0 ? colorUnread : textColorSecondary);
} }

@ -238,7 +238,7 @@ public class AdapterFolder extends RecyclerView.Adapter<AdapterFolder.ViewHolder
else else
tvName.setText(folder.getDisplayName(context, parent)); tvName.setText(folder.getDisplayName(context, parent));
tvName.setTypeface(null, folder.unseen > 0 ? Typeface.BOLD : Typeface.NORMAL); tvName.setTypeface(folder.unseen > 0 ? Typeface.DEFAULT_BOLD : Typeface.DEFAULT);
tvName.setTextColor(folder.unseen > 0 ? colorUnread : textColorSecondary); tvName.setTextColor(folder.unseen > 0 ? colorUnread : textColorSecondary);
if (listener == null) { if (listener == null) {

@ -570,12 +570,18 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
} }
// Unseen // Unseen
int typeface = (message.unseen > 0 ? Typeface.BOLD : Typeface.NORMAL); Typeface typeface = (message.unseen > 0 ? Typeface.DEFAULT_BOLD : Typeface.DEFAULT);
tvFrom.setTypeface(null, typeface); tvFrom.setTypeface(typeface);
tvSize.setTypeface(null, typeface); tvSize.setTypeface(typeface);
tvTime.setTypeface(null, typeface); tvTime.setTypeface(typeface);
tvSubject.setTypeface(null, typeface | (subject_italic ? Typeface.ITALIC : 0)); if (subject_italic)
tvCount.setTypeface(null, typeface); if (message.unseen > 0)
tvSubject.setTypeface(null, Typeface.BOLD_ITALIC);
else
tvSubject.setTypeface(null, Typeface.ITALIC);
else
tvSubject.setTypeface(typeface);
tvCount.setTypeface(typeface);
int colorUnseen = (message.unseen > 0 ? colorUnread : textColorSecondary); int colorUnseen = (message.unseen > 0 ? colorUnread : textColorSecondary);
tvFrom.setTextColor(colorUnseen); tvFrom.setTextColor(colorUnseen);
@ -937,7 +943,10 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
tvSubjectEx.setVisibility(show_addresses ? View.VISIBLE : View.GONE); tvSubjectEx.setVisibility(show_addresses ? View.VISIBLE : View.GONE);
tvSubjectEx.setText(message.subject); tvSubjectEx.setText(message.subject);
tvSubjectEx.setTypeface(null, subject_italic ? Typeface.ITALIC : Typeface.NORMAL); if (subject_italic)
tvSubjectEx.setTypeface(Typeface.DEFAULT, Typeface.ITALIC);
else
tvSubjectEx.setTypeface(Typeface.DEFAULT);
// Flags // Flags
tvFlags.setVisibility(show_addresses && debug ? View.VISIBLE : View.GONE); tvFlags.setVisibility(show_addresses && debug ? View.VISIBLE : View.GONE);

Loading…
Cancel
Save