aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2017-06-11 13:55:45 +0200
committersteckbrief <steckbrief@chefmail.de>2017-06-11 13:55:45 +0200
commit9599b54329d0dbd7b9c69146af99caf90f15b9d7 (patch)
treeb290e263e91bb27bf6f69577b461f1b7f8e320f0 /src
parent754de6bb0449a577d2bb9c28cca6adf0ef9554f6 (diff)
Fix wrong id for setColorColorAndText
Diffstat (limited to 'src')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/utils/ui/TextViewUtil.java13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/utils/ui/TextViewUtil.java b/src/main/java/de/thedevstack/conversationsplus/utils/ui/TextViewUtil.java
index faa9a5ed..fefebdf0 100644
--- a/src/main/java/de/thedevstack/conversationsplus/utils/ui/TextViewUtil.java
+++ b/src/main/java/de/thedevstack/conversationsplus/utils/ui/TextViewUtil.java
@@ -1,5 +1,6 @@
package de.thedevstack.conversationsplus.utils.ui;
+import android.support.annotation.ColorRes;
import android.support.annotation.StringRes;
import android.view.View;
import android.widget.TextView;
@@ -58,12 +59,20 @@ public final class TextViewUtil extends ViewUtil {
}
public static void setColor(TextView tv, Integer color) {
- setColorEnabledAndTextResId(tv, color, null, null);
+ setColorByIdEnabledAndTextResId(tv, color, null, null);
+ }
+
+ private static void setColorByIdEnabledAndTextResId(TextView tv, @ColorRes Integer colorResId, Boolean enabled, @StringRes Integer resid) {
+ Integer color = null;
+ if (null != colorResId) {
+ color = ConversationsPlusColors.byId(colorResId);
+ }
+ setColorEnabledAndTextResId(tv, color, enabled, resid);
}
public static void setColorEnabledAndTextResId(TextView tv, Integer color, Boolean enabled, @StringRes Integer resid) {
if (null != color) {
- tv.setTextColor(ConversationsPlusColors.byId(color));
+ tv.setTextColor(color);
}
if (enabled != null) {