aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/de/pixart/messenger/ui/StartConversationActivity.java13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
index 2f72964fc..70995e8d2 100644
--- a/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
+++ b/src/main/java/de/pixart/messenger/ui/StartConversationActivity.java
@@ -102,6 +102,7 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
@Override
public boolean onMenuItemActionExpand(MenuItem item) {
mSearchEditText.post(() -> {
+ updateSearchViewHint();
mSearchEditText.requestFocus();
if (oneShotKeyboardSuppress.compareAndSet(true, false)) {
return;
@@ -544,6 +545,17 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
super.invalidateOptionsMenu();
}
+ private void updateSearchViewHint() {
+ if (binding == null || mSearchEditText == null) {
+ return;
+ }
+ if (binding.startConversationViewPager.getCurrentItem() == 0) {
+ mSearchEditText.setHint(R.string.search_contacts);
+ } else {
+ mSearchEditText.setHint(R.string.search_groups);
+ }
+ }
+
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.start_conversation, menu);
@@ -571,6 +583,7 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
mSearchEditText.append(initialSearchValue);
filter(initialSearchValue);
}
+ updateSearchViewHint();
return super.onCreateOptionsMenu(menu);
}