From e7d33bb570dfd4b51e0e9d94b9670e436d551c6e Mon Sep 17 00:00:00 2001 From: kunfei Date: Sun, 25 Aug 2019 13:02:00 +0800 Subject: [PATCH] up --- app/src/main/java/io/legado/app/lib/theme/ATHUtils.kt | 6 ++++-- app/src/main/res/layout/dialog_read_aloud.xml | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/io/legado/app/lib/theme/ATHUtils.kt b/app/src/main/java/io/legado/app/lib/theme/ATHUtils.kt index ed6dfb734..24d0a923a 100644 --- a/app/src/main/java/io/legado/app/lib/theme/ATHUtils.kt +++ b/app/src/main/java/io/legado/app/lib/theme/ATHUtils.kt @@ -15,8 +15,10 @@ object ATHUtils { @JvmOverloads fun resolveColor(context: Context, @AttrRes attr: Int, fallback: Int = 0): Int { val a = context.theme.obtainStyledAttributes(intArrayOf(attr)) - try { - return a.getColor(0, fallback) + return try { + a.getColor(0, fallback) + } catch (e: Exception) { + fallback } finally { a.recycle() } diff --git a/app/src/main/res/layout/dialog_read_aloud.xml b/app/src/main/res/layout/dialog_read_aloud.xml index 505344bfa..114a3eebf 100644 --- a/app/src/main/res/layout/dialog_read_aloud.xml +++ b/app/src/main/res/layout/dialog_read_aloud.xml @@ -3,6 +3,7 @@ android:orientation="vertical" android:layout_width="match_parent" android:layout_height="match_parent" + android:background="@color/background_menu" android:padding="10dp"> @@ -68,7 +69,6 @@