From 9cf09386c457572bb5f2bf99b73e55ae61f085c1 Mon Sep 17 00:00:00 2001 From: Gavriil Sitnikov Date: Tue, 29 Mar 2016 20:40:01 +0300 Subject: [PATCH] allowing no typeface if view created from code --- .../touchin/roboswag/components/views/TypefacedViewHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/ru/touchin/roboswag/components/views/TypefacedViewHelper.java b/src/main/java/ru/touchin/roboswag/components/views/TypefacedViewHelper.java index c8f8bf7..e050433 100644 --- a/src/main/java/ru/touchin/roboswag/components/views/TypefacedViewHelper.java +++ b/src/main/java/ru/touchin/roboswag/components/views/TypefacedViewHelper.java @@ -37,7 +37,7 @@ public final class TypefacedViewHelper { final Typeface typeface = typefacedText.getTypeface(); typefacedText.setTypeface(customTypeface, typeface == null ? Typeface.NORMAL : typeface.getStyle()); } - } else if (!allowEmptyCustomTypeface) { + } else if (attrs != null && !allowEmptyCustomTypeface) { Lc.assertion("TypefacedText has no customTypeface attribute: " + typefacedText); } }