Set un/junk button title

This commit is contained in:
M66B 2020-03-03 11:54:55 +01:00
parent bd16be7f1f
commit 4a54728867
1 changed files with 4 additions and 0 deletions

View File

@ -3108,6 +3108,10 @@ public class AdapterMessage extends RecyclerView.Adapter<AdapterMessage.ViewHold
if (normal) { if (normal) {
ibTrash.setTag(delete); ibTrash.setTag(delete);
ibJunk.setImageResource(unjunk ? R.drawable.baseline_inbox_24 : R.drawable.baseline_flag_24); ibJunk.setImageResource(unjunk ? R.drawable.baseline_inbox_24 : R.drawable.baseline_flag_24);
String title = context.getString(unjunk ? R.string.title_no_junk : R.string.title_spam);
ibJunk.setContentDescription(title);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O)
ibJunk.setTooltipText(title);
ibArchive.setVisibility(archive ? View.VISIBLE : View.GONE); ibArchive.setVisibility(archive ? View.VISIBLE : View.GONE);
ibTrash.setVisibility(trash ? View.VISIBLE : View.GONE); ibTrash.setVisibility(trash ? View.VISIBLE : View.GONE);