R.drawable.bg_unread_notification for API 21

This commit is contained in:
Benoit Marty 2020-08-05 18:21:13 +02:00
parent 0a775444dd
commit 20336af84e
5 changed files with 2 additions and 22 deletions

View file

@ -38,7 +38,7 @@ class UnreadCounterBadgeView : AppCompatTextView {
val bgRes = if (state.highlighted) {
R.drawable.bg_unread_highlight
} else {
ThemeUtils.getResourceId(context, R.drawable.bg_unread_notification_light)
R.drawable.bg_unread_notification
}
setBackgroundResource(bgRes)
text = RoomSummaryFormatter.formatUnreadMessagesCounter(state.count)

View file

@ -180,7 +180,6 @@ object ThemeUtils {
THEME_DARK_VALUE -> {
return when (resourceId) {
R.drawable.bg_search_edit_text_light -> R.drawable.bg_search_edit_text_dark
R.drawable.bg_unread_notification_light -> R.drawable.bg_unread_notification_dark
R.drawable.vector_label_background_light -> R.drawable.vector_label_background_dark
else -> {
Timber.w("Warning, missing case for wanted drawable in dark theme")
@ -191,7 +190,6 @@ object ThemeUtils {
THEME_BLACK_VALUE -> {
return when (resourceId) {
R.drawable.bg_search_edit_text_light -> R.drawable.bg_search_edit_text_black
R.drawable.bg_unread_notification_light -> R.drawable.bg_unread_notification_black
R.drawable.vector_label_background_light -> R.drawable.vector_label_background_black
else -> {
Timber.w("Warning, missing case for wanted drawable in black theme")

View file

@ -5,5 +5,5 @@
<corners android:radius="40dp" />
<solid android:color="@color/riotx_unread_room_badge_dark" />
<solid android:color="?riotx_unread_room_badge" />
</shape>

View file

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="40dp" />
<solid android:color="@color/riotx_unread_room_badge_black" />
</shape>

View file

@ -1,9 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<shape xmlns:android="http://schemas.android.com/apk/res/android"
android:shape="rectangle">
<corners android:radius="40dp" />
<solid android:color="@color/riotx_unread_room_badge_light" />
</shape>