pull/32/head
kunfei 5 years ago
parent 5251f7bcc6
commit e7d33bb570
  1. 6
      app/src/main/java/io/legado/app/lib/theme/ATHUtils.kt
  2. 2
      app/src/main/res/layout/dialog_read_aloud.xml

@ -15,8 +15,10 @@ object ATHUtils {
@JvmOverloads @JvmOverloads
fun resolveColor(context: Context, @AttrRes attr: Int, fallback: Int = 0): Int { fun resolveColor(context: Context, @AttrRes attr: Int, fallback: Int = 0): Int {
val a = context.theme.obtainStyledAttributes(intArrayOf(attr)) val a = context.theme.obtainStyledAttributes(intArrayOf(attr))
try { return try {
return a.getColor(0, fallback) a.getColor(0, fallback)
} catch (e: Exception) {
fallback
} finally { } finally {
a.recycle() a.recycle()
} }

@ -3,6 +3,7 @@
android:orientation="vertical" android:orientation="vertical"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="match_parent" android:layout_height="match_parent"
android:background="@color/background_menu"
android:padding="10dp"> android:padding="10dp">
@ -68,7 +69,6 @@
<LinearLayout <LinearLayout
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:background="@color/background_menu"
android:orientation="vertical"> android:orientation="vertical">
<LinearLayout <LinearLayout

Loading…
Cancel
Save