@ -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()
}
@ -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 @@
<LinearLayout
android:layout_height="wrap_content"
android:orientation="vertical">