diff options
author | Christian Schneppe <christian@pix-art.de> | 2018-04-29 23:28:20 +0200 |
---|---|---|
committer | Christian Schneppe <christian@pix-art.de> | 2018-04-29 23:28:20 +0200 |
commit | 02718edf44e6d23504a71ae9266a6c675913a75b (patch) | |
tree | 75b10f63695458b977571ee198be2a4567cf8d50 /src/main/java/de | |
parent | d625467c224a78809d086dfceb13a8e0aea6dcb0 (diff) |
fine tuned style of toolbar search view
Diffstat (limited to 'src/main/java/de')
-rw-r--r-- | src/main/java/de/pixart/messenger/ui/StartConversationActivity.java | 13 |
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); } |