aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/utils/ui
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/utils/ui')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/utils/ui/TextViewUtil.java16
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);
}