diff options
author | steckbrief <steckbrief@chefmail.de> | 2016-04-23 23:22:57 +0200 |
---|---|---|
committer | steckbrief <steckbrief@chefmail.de> | 2016-04-23 23:22:57 +0200 |
commit | b5abdd1b6ddf73cc9da49e3213d0d44e4b29ff5c (patch) | |
tree | b1d28cc2b00622d7feeff4569aa2a054d3a82b80 /src/main/java/de/thedevstack/conversationsplus/utils/ui | |
parent | 52fec558adb2b4d9bb3df314fd919570e7198e26 (diff) | |
parent | b789ace386ef3cfe6e0c3834b2a425813f702f43 (diff) |
Merge remote-tracking branch 'remotes/origin/trz/rename' into trz/rebase
Conflicts:
src/main/java/de/thedevstack/conversationsplus/ConversationsPlusApplication.java
src/main/java/de/thedevstack/conversationsplus/ui/dialogs/MessageDetailsDialog.java
src/main/java/de/thedevstack/conversationsplus/utils/MessageUtil.java
src/main/java/eu/siacs/conversations/generator/MessageGenerator.java
src/main/java/eu/siacs/conversations/ui/SettingsActivity.java
Diffstat (limited to '')
-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); } |