aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/thedevstack/conversationsplus/ui/VerifyOTRActivity.java
diff options
context:
space:
mode:
authorsteckbrief <steckbrief@chefmail.de>2016-03-29 22:28:19 +0200
committersteckbrief <steckbrief@chefmail.de>2016-03-29 22:28:19 +0200
commit1d5d94080a6bffaf5fa7c358af76a3cfae0a8ade (patch)
tree8aa91ceb1f114a2d20249c65223e6b87b7191af6 /src/main/java/de/thedevstack/conversationsplus/ui/VerifyOTRActivity.java
parent6244834096727cfc1aaaeba7845a6d9cfe27d2b0 (diff)
Introduction of a TextViewUtil to easily set attributes for TextViews
Diffstat (limited to 'src/main/java/de/thedevstack/conversationsplus/ui/VerifyOTRActivity.java')
-rw-r--r--src/main/java/de/thedevstack/conversationsplus/ui/VerifyOTRActivity.java9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/main/java/de/thedevstack/conversationsplus/ui/VerifyOTRActivity.java b/src/main/java/de/thedevstack/conversationsplus/ui/VerifyOTRActivity.java
index 3ecdc179..4f1c9fc7 100644
--- a/src/main/java/de/thedevstack/conversationsplus/ui/VerifyOTRActivity.java
+++ b/src/main/java/de/thedevstack/conversationsplus/ui/VerifyOTRActivity.java
@@ -27,6 +27,7 @@ import de.thedevstack.conversationsplus.entities.Conversation;
import de.thedevstack.conversationsplus.services.XmppConnectionService;
import de.thedevstack.conversationsplus.utils.CryptoHelper;
import de.thedevstack.conversationsplus.utils.XmppUri;
+import de.thedevstack.conversationsplus.utils.ui.TextViewUtil;
import de.thedevstack.conversationsplus.xmpp.jid.InvalidJidException;
import de.thedevstack.conversationsplus.xmpp.jid.Jid;
@@ -380,16 +381,12 @@ public class VerifyOTRActivity extends XmppActivity implements XmppConnectionSer
}
protected void activateButton(Button button, int text, View.OnClickListener listener) {
- button.setEnabled(true);
- button.setTextColor(ConversationsPlusColors.primaryText());
- button.setText(text);
+ TextViewUtil.enable(button, ConversationsPlusColors.primaryText(), text);
button.setOnClickListener(listener);
}
protected void deactivateButton(Button button, int text) {
- button.setEnabled(false);
- button.setTextColor(ConversationsPlusColors.secondaryText());
- button.setText(text);
+ TextViewUtil.disable(button, ConversationsPlusColors.secondaryText(), text);
button.setOnClickListener(null);
}