aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/ui
diff options
context:
space:
mode:
authorChristian Schneppe <christian@pix-art.de>2016-09-14 22:47:05 +0200
committerChristian Schneppe <christian@pix-art.de>2016-09-14 22:47:05 +0200
commit578857f40a509d86539e26eb97a9045af567c41e (patch)
tree4154e6a189d3cd3e139005180627d281bf4c1715 /src/main/java/de/pixart/messenger/ui
parentd2c39be11bf29806d2fc0dea27fabbfd7c3a8daa (diff)
scroll actionbar titles if they are too long
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui')
-rw-r--r--src/main/java/de/pixart/messenger/ui/ConversationActivity.java19
1 files changed, 10 insertions, 9 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java
index 6d03cb5d6..935b245a4 100644
--- a/src/main/java/de/pixart/messenger/ui/ConversationActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/ConversationActivity.java
@@ -470,48 +470,49 @@ public class ConversationActivity extends XmppActivity
ab.setDisplayShowTitleEnabled(false);
ab.setDisplayShowCustomEnabled(true);
ab.setCustomView(R.layout.ab_title);
+ TextView abtitle = (TextView) findViewById(android.R.id.text1);
+ TextView absubtitle = (TextView) findViewById(android.R.id.text2);
if (conversation.getMode() == Conversation.MODE_SINGLE || useSubjectToIdentifyConference()) {
- TextView abtitle = (TextView) findViewById(android.R.id.text1);
abtitle.setText(conversation.getName());
abtitle.setOnClickListener(this);
+ abtitle.setSelected(true);
if (conversation.getMode() == Conversation.MODE_SINGLE && !this.getSelectedConversation().withSelf()) {
if (conversation.getContact().getShownStatus() == Presence.Status.OFFLINE) {
- TextView absubtitle = (TextView) findViewById(android.R.id.text2);
absubtitle.setText(getString(R.string.account_status_offline));
+ absubtitle.setSelected(true);
absubtitle.setOnClickListener(this);
} else {
ChatState state = conversation.getIncomingChatState();
if (state == ChatState.COMPOSING) {
- TextView absubtitle = (TextView) findViewById(android.R.id.text2);
absubtitle.setText(getString(R.string.is_typing));
absubtitle.setTypeface(null, Typeface.BOLD_ITALIC);
+ absubtitle.setSelected(true);
absubtitle.setOnClickListener(this);
} else if (state == ChatState.PAUSED) {
- TextView absubtitle = (TextView) findViewById(android.R.id.text2);
absubtitle.setText(UIHelper.lastseen(getApplicationContext(), conversation.getContact().isActive(), conversation.getContact().getLastseen()));
+ absubtitle.setSelected(true);
absubtitle.setOnClickListener(this);
} else {
- TextView absubtitle = (TextView) findViewById(android.R.id.text2);
absubtitle.setText(UIHelper.lastseen(getApplicationContext(), conversation.getContact().isActive(), conversation.getContact().getLastseen()));
+ absubtitle.setSelected(true);
absubtitle.setOnClickListener(this);
}
}
} else if (useSubjectToIdentifyConference()) {
if (conversation.getParticipants() != null) {
- TextView absubtitle = (TextView) findViewById(android.R.id.text2);
absubtitle.setText(conversation.getParticipants());
+ absubtitle.setSelected(true);
absubtitle.setOnClickListener(this);
} else {
- TextView absubtitle = (TextView) findViewById(android.R.id.text2);
absubtitle.setText(R.string.no_participants);
+ abtitle.setSelected(true);
absubtitle.setOnClickListener(this);
}
}
} else {
- TextView abtitle = (TextView) findViewById(android.R.id.text1);
abtitle.setText(conversation.getJid().toBareJid().toString());
abtitle.setOnClickListener(this);
- TextView absubtitle = (TextView) findViewById(android.R.id.text2);
+ abtitle.setSelected(true);
absubtitle.setText(null);
absubtitle.setOnClickListener(this);
}