|
|
|
@ -104,12 +104,16 @@ public class AdapterContact extends RecyclerView.Adapter<AdapterContact.ViewHold
|
|
|
|
|
private void bindTo(TupleContactEx contact) {
|
|
|
|
|
view.setAlpha(contact.state == EntityContact.STATE_IGNORE ? Helper.LOW_LIGHT : 1.0f);
|
|
|
|
|
|
|
|
|
|
if (contact.type == EntityContact.TYPE_FROM)
|
|
|
|
|
if (contact.type == EntityContact.TYPE_FROM) {
|
|
|
|
|
ivType.setImageResource(R.drawable.baseline_call_received_24);
|
|
|
|
|
else if (contact.type == EntityContact.TYPE_TO)
|
|
|
|
|
ivType.setContentDescription(context.getString(R.string.title_accessibility_from));
|
|
|
|
|
} else if (contact.type == EntityContact.TYPE_TO) {
|
|
|
|
|
ivType.setImageResource(R.drawable.baseline_call_made_24);
|
|
|
|
|
else
|
|
|
|
|
ivType.setContentDescription(context.getString(R.string.title_accessibility_to));
|
|
|
|
|
} else {
|
|
|
|
|
ivType.setImageDrawable(null);
|
|
|
|
|
ivType.setContentDescription(null);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (contact.avatar == null || !contacts)
|
|
|
|
|
ivAvatar.setImageDrawable(null);
|
|
|
|
@ -154,6 +158,8 @@ public class AdapterContact extends RecyclerView.Adapter<AdapterContact.ViewHold
|
|
|
|
|
? R.drawable.baseline_star_24 : R.drawable.baseline_star_border_24);
|
|
|
|
|
ivFavorite.setImageTintList(ColorStateList.valueOf(
|
|
|
|
|
contact.state == EntityContact.STATE_FAVORITE ? colorAccent : textColorSecondary));
|
|
|
|
|
ivFavorite.setContentDescription(context.getString(contact.state == EntityContact.STATE_FAVORITE
|
|
|
|
|
? R.string.title_accessibility_flagged : null));
|
|
|
|
|
|
|
|
|
|
view.requestLayout();
|
|
|
|
|
}
|
|
|
|
|