set unread count badge color

This commit is contained in:
adbenitez
2020-12-06 14:15:01 -05:00
parent 79720b3982
commit 072dafda97
@@ -273,6 +273,9 @@ public class ConversationListItem extends RelativeLayout
unreadIndicator.setVisibility(View.GONE);
}
else {
final TypedArray attrs = getContext().obtainStyledAttributes(new int[] {
R.attr.conversation_list_item_unreadcount_color,
});
unreadIndicator.setImageDrawable(TextDrawable.builder()
.beginConfig()
.width(ViewUtil.dpToPx(getContext(), 24))
@@ -280,7 +283,7 @@ public class ConversationListItem extends RelativeLayout
.textColor(Color.WHITE)
.bold()
.endConfig()
.buildRound(String.valueOf(unreadCount), getResources().getColor(R.color.green_A700)));
.buildRound(String.valueOf(unreadCount), attrs.getColor(0, Color.BLACK)));
unreadIndicator.setVisibility(View.VISIBLE);
}
}