mirror of
https://github.com/ArcaneChat/android.git
synced 2026-07-03 14:05:24 +02:00
set unread count badge color
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user