From 54883e6914edc1d5688520056133ef015ae55438 Mon Sep 17 00:00:00 2001 From: Fahim Salam Chowdhury Date: Tue, 26 Apr 2022 11:09:43 +0600 Subject: [PATCH] 5034-Fix_unreade_mail_item_background_transparent_issue issue: https://gitlab.e.foundation/e/backlog/-/issues/5034 Unread messageItem has a kind-of transparent background color, which sometimes create issue on item draw. This commit change the background color to its counterpart solid color. --- app/k9mail-jmap/src/main/res/values/themes.xml | 4 ++-- app/k9mail/src/main/res/values-night/colors.xml | 2 +- app/k9mail/src/main/res/values/colors.xml | 2 +- app/k9mail/src/main/res/values/themes.xml | 2 +- .../src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt | 3 ++- 5 files changed, 7 insertions(+), 6 deletions(-) diff --git a/app/k9mail-jmap/src/main/res/values/themes.xml b/app/k9mail-jmap/src/main/res/values/themes.xml index 092f7eb934..c59116162c 100644 --- a/app/k9mail-jmap/src/main/res/values/themes.xml +++ b/app/k9mail-jmap/src/main/res/values/themes.xml @@ -81,7 +81,7 @@ @android:color/secondary_text_light #8038B8E2 #c0cdcdcd - #00ffffff + #DCDCDC ?android:attr/colorBackground @drawable/thread_count_box_light #ff2ea7d1 @@ -200,7 +200,7 @@ @android:color/secondary_text_dark #8038B8E2 #00000000 - #c05a5a5a + #2F2F2F ?android:attr/colorBackground @drawable/thread_count_box_dark #ff33b5e5 diff --git a/app/k9mail/src/main/res/values-night/colors.xml b/app/k9mail/src/main/res/values-night/colors.xml index 8289f8c154..d36ff2bd1d 100644 --- a/app/k9mail/src/main/res/values-night/colors.xml +++ b/app/k9mail/src/main/res/values-night/colors.xml @@ -1,5 +1,5 @@ - #1FFFFFFF + #2F2F2F #61FFFFFF \ No newline at end of file diff --git a/app/k9mail/src/main/res/values/colors.xml b/app/k9mail/src/main/res/values/colors.xml index cfe20f6213..9de6b37af1 100644 --- a/app/k9mail/src/main/res/values/colors.xml +++ b/app/k9mail/src/main/res/values/colors.xml @@ -12,6 +12,6 @@ @lineageos.platform:color/color_default_gray2 @lineageos.platform:color/color_default_selector_background - #1F000000 + #DCDCDC #61000000 \ No newline at end of file diff --git a/app/k9mail/src/main/res/values/themes.xml b/app/k9mail/src/main/res/values/themes.xml index 1951ae4cc9..2e7b59f7a6 100644 --- a/app/k9mail/src/main/res/values/themes.xml +++ b/app/k9mail/src/main/res/values/themes.xml @@ -214,7 +214,7 @@ @color/color_default_secondary_text @color/color_message_list_selected_background #c0cdcdcd - #00ffffff + @color/color_message_list_unread_background ?android:attr/colorBackground @drawable/thread_count_box_light @color/color_default_accent diff --git a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt index 0c026017b3..e07b709cf2 100644 --- a/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt +++ b/app/ui/legacy/src/main/java/com/fsck/k9/fragment/MessageListAdapter.kt @@ -17,6 +17,7 @@ import android.view.ViewGroup import android.widget.BaseAdapter import android.widget.ImageView import android.widget.TextView +import androidx.core.content.ContextCompat import androidx.core.graphics.drawable.DrawableCompat import androidx.core.view.isVisible import com.fsck.k9.FontSizes @@ -256,7 +257,7 @@ class MessageListAdapter internal constructor( selected -> selectedItemBackgroundColor backGroundAsReadIndicator && read -> readItemBackgroundColor backGroundAsReadIndicator && !read -> unreadItemBackgroundColor - else -> Color.TRANSPARENT + else -> ContextCompat.getColor(view.context, R.color.color_default_background) } view.setBackgroundColor(backgroundColor) -- GitLab