aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Gultsch <daniel@gultsch.de>2016-05-27 19:17:57 +0200
committerDaniel Gultsch <daniel@gultsch.de>2016-05-27 19:17:57 +0200
commita241ab66de50ad7fada548bdec1877b4b564f878 (patch)
tree8c4dceca2f8fcc03a4f789ea2883aadb19616cdb
parentf70fcc7bb8aa02374f664b95d44a9edc38bfdb39 (diff)
use activity title 'choose participants' when doing that
-rw-r--r--src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java19
-rw-r--r--src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java1
2 files changed, 20 insertions, 0 deletions
diff --git a/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java b/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java
index d930e239..5156fcca 100644
--- a/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/ChooseContactActivity.java
@@ -1,8 +1,10 @@
package eu.siacs.conversations.ui;
+import android.app.ActionBar;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
+import android.support.annotation.StringRes;
import android.view.ActionMode;
import android.view.Menu;
import android.view.MenuInflater;
@@ -32,6 +34,7 @@ public class ChooseContactActivity extends AbstractSearchableListItemActivity {
private Set<Contact> selected;
private Set<String> filterContacts;
+ public static final String EXTRA_TITLE_RES_ID = "extra_title_res_id";
@Override
public void onCreate(final Bundle savedInstanceState) {
@@ -132,6 +135,22 @@ public class ChooseContactActivity extends AbstractSearchableListItemActivity {
}
@Override
+ public void onStart() {
+ super.onStart();
+ Intent intent = getIntent();
+ @StringRes
+ int res = intent != null ? intent.getIntExtra(EXTRA_TITLE_RES_ID,R.string.title_activity_choose_contact) : R.string.title_activity_choose_contact;
+ ActionBar bar = getActionBar();
+ if (bar != null) {
+ try {
+ bar.setTitle(res);
+ } catch (Exception e) {
+ bar.setTitle(R.string.title_activity_choose_contact);
+ }
+ }
+ }
+
+ @Override
public boolean onCreateOptionsMenu(final Menu menu) {
super.onCreateOptionsMenu(menu);
final Intent i = getIntent();
diff --git a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
index df7b2498..9af83edd 100644
--- a/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
+++ b/src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
@@ -556,6 +556,7 @@ public class StartConversationActivity extends XmppActivity implements OnRosterU
intent.putExtra("show_enter_jid", true);
intent.putExtra("subject", subject.getText().toString());
intent.putExtra(EXTRA_ACCOUNT, account.getJid().toBareJid().toString());
+ intent.putExtra(ChooseContactActivity.EXTRA_TITLE_RES_ID,R.string.choose_participants);
startActivityForResult(intent, REQUEST_CREATE_CONFERENCE);
}
});