From 313887b289dee25063387140dbc77f6a62d668ac Mon Sep 17 00:00:00 2001 From: Jan Reehuis Date: Thu, 18 Mar 2021 14:42:45 +0100 Subject: [PATCH] fixes font family path check for release builds --- .../android/material/composethemeadapter/TypedArrayUtils.kt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/src/main/java/com/google/android/material/composethemeadapter/TypedArrayUtils.kt b/lib/src/main/java/com/google/android/material/composethemeadapter/TypedArrayUtils.kt index 4013484..a7008c3 100644 --- a/lib/src/main/java/com/google/android/material/composethemeadapter/TypedArrayUtils.kt +++ b/lib/src/main/java/com/google/android/material/composethemeadapter/TypedArrayUtils.kt @@ -215,7 +215,7 @@ internal fun TypedArray.getFontFamilyOrNull(index: Int): FontFamilyWithWeight? { else -> { // If there's a resource ID and the string starts with res/font, // it's probably a @font resource - if (tv.resourceId != 0 && tv.string.startsWith("res/font")) { + if (tv.resourceId != 0 && tv.string.startsWith("res/")) { // If we're running on API 23+ and the resource is an XML, we can parse // the fonts into a full FontFamily. if (Build.VERSION.SDK_INT >= 23 && tv.string.endsWith(".xml")) {