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 @@