From 61ab39d26200a3a598c42f38744988b5ebc7135a Mon Sep 17 00:00:00 2001 From: gedoor Date: Wed, 12 Aug 2020 17:52:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/src/main/java/io/legado/app/ui/widget/text/BadgeView.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/app/src/main/java/io/legado/app/ui/widget/text/BadgeView.kt b/app/src/main/java/io/legado/app/ui/widget/text/BadgeView.kt index 33fc8b3a2..c24e13e87 100644 --- a/app/src/main/java/io/legado/app/ui/widget/text/BadgeView.kt +++ b/app/src/main/java/io/legado/app/ui/widget/text/BadgeView.kt @@ -148,7 +148,11 @@ class BadgeView @JvmOverloads constructor( } fun setHighlight(highlight: Boolean) { - setBackground(context.getCompatColor(if (highlight) R.color.highlight else R.color.darker_gray)) + if (highlight) { + setBackground(context.accentColor) + } else { + setBackground(context.getCompatColor(R.color.darker_gray)) + } } fun setBadgeMargin(dipMargin: Int) {