From 14b082f7670b25aabe22a3cd8db334b327645f8f Mon Sep 17 00:00:00 2001 From: cyBerta Date: Mon, 12 Dec 2022 14:06:52 +0100 Subject: setting spannable in ActionBar correctly. Fixes crash --- app/src/main/java/se/leap/bitmaskclient/base/utils/ViewHelper.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/src/main/java/se/leap/bitmaskclient/base/utils/ViewHelper.java b/app/src/main/java/se/leap/bitmaskclient/base/utils/ViewHelper.java index 8076f99e..bbd77c36 100644 --- a/app/src/main/java/se/leap/bitmaskclient/base/utils/ViewHelper.java +++ b/app/src/main/java/se/leap/bitmaskclient/base/utils/ViewHelper.java @@ -61,7 +61,7 @@ public class ViewHelper { public static void setActionBarTextColor(ActionBar bar, @ColorRes int titleColor) { CharSequence titleCharSequence = bar.getTitle(); - if (titleCharSequence == null) { + if (titleCharSequence == null || titleCharSequence.length() == 0) { return; } String title = titleCharSequence.toString(); -- cgit v1.2.3