diff options
author | steckbrief <steckbrief@chefmail.de> | 2016-05-13 11:23:45 +0200 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2016-05-13 11:23:45 +0200 |
commit | 351db27a77c200e526b86c318213b72cd65d1b7b (patch) | |
tree | 7802de24b0666d1a28ecffec0280d74173642d2b /src/main/java/de/thedevstack/conversationsplus/utils/ui/TextViewUtil.java | |
parent | 70938a31a0e78203449d769fa5bda15ce73d1ed4 (diff) | |
parent | 10e607ac51dcc42fa1b54bacb698beed43750de7 (diff) |
Merge branch 'master' into message_display_rework
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/utils/ui/TextViewUtil.java')
-rw-r--r-- | src/main/java/de/thedevstack/conversationsplus/utils/ui/TextViewUtil.java | 16 |
1 files changed, 16 insertions, 0 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 bb08014b..a775dad6 100644 --- a/src/main/java/de/thedevstack/conversationsplus/utils/ui/TextViewUtil.java +++ b/src/main/java/de/thedevstack/conversationsplus/utils/ui/TextViewUtil.java @@ -1,12 +1,28 @@ package de.thedevstack.conversationsplus.utils.ui; import android.support.annotation.StringRes; +import android.view.View; import android.widget.TextView; /** * Created by steckbrief on 29.03.2016. */ public final class TextViewUtil { + + public static void setText(View parentView, int textViewId, CharSequence text) { + TextView tv = (TextView) parentView.findViewById(textViewId); + if (null != tv) { + tv.setText(text); + } + } + + public static void setText(View parentView, int textViewId, int textResId) { + TextView tv = (TextView) parentView.findViewById(textViewId); + if (null != tv) { + tv.setText(textResId); + } + } + public static void enable(TextView tv) { setColorEnabledAndTextResId(tv, null, true, null); } |