Unflagged is unimportant for accessibility

This commit is contained in:
M66B 2019-12-24 11:56:06 +01:00
parent d5a11a8004
commit 7b10f68040
1 changed files with 2 additions and 0 deletions

View File

@ -1081,6 +1081,8 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
int color = (message.color == null || !pro ? colorAccent : message.color); int color = (message.color == null || !pro ? colorAccent : message.color);
ibFlagged.setImageResource(flagged > 0 ? R.drawable.baseline_star_24 : R.drawable.baseline_star_border_24); ibFlagged.setImageResource(flagged > 0 ? R.drawable.baseline_star_24 : R.drawable.baseline_star_border_24);
ibFlagged.setImportantForAccessibility(
flagged == 0 ? View.IMPORTANT_FOR_ACCESSIBILITY_NO : View.IMPORTANT_FOR_ACCESSIBILITY_AUTO);
ibFlagged.setContentDescription(context.getString( ibFlagged.setContentDescription(context.getString(
flagged > 0 ? R.string.title_accessibility_flagged : R.string.title_accessibility_unflagged)); flagged > 0 ? R.string.title_accessibility_flagged : R.string.title_accessibility_unflagged));
ibFlagged.setImageTintList(ColorStateList.valueOf(flagged > 0 ? color : textColorSecondary)); ibFlagged.setImageTintList(ColorStateList.valueOf(flagged > 0 ? color : textColorSecondary));