fixed regression of search hint not updating in StartConversation screen

This commit is contained in:
Daniel Gultsch 2019-02-15 14:07:39 +01:00
parent 6b5e81df49
commit f26a57ced4
3 changed files with 9 additions and 2 deletions

View File

@ -19,6 +19,7 @@ import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentManager;
import android.support.v4.app.FragmentTransaction;
import android.support.v4.view.PagerAdapter;
import android.support.v4.view.ViewPager;
import android.support.v4.widget.SwipeRefreshLayout;
import android.support.v7.app.ActionBar;
import android.support.v7.app.AlertDialog;
@ -264,6 +265,12 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
binding.speedDial.inflate(R.menu.start_conversation_fab_submenu);
binding.tabLayout.setupWithViewPager(binding.startConversationViewPager);
binding.startConversationViewPager.addOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
@Override
public void onPageSelected(int position) {
updateSearchViewHint();
}
});
mListPagerAdapter = new ListPagerAdapter(getSupportFragmentManager());
binding.startConversationViewPager.setAdapter(mListPagerAdapter);
@ -603,7 +610,7 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
if (binding.startConversationViewPager.getCurrentItem() == 0) {
mSearchEditText.setHint(R.string.search_contacts);
} else {
mSearchEditText.setHint(R.string.search_groups);
mSearchEditText.setHint(R.string.search_bookmarks);
}
}

View File

@ -442,7 +442,7 @@
<string name="recently_used">Most recently used</string>
<string name="choose_quick_action">Choose quick action</string>
<string name="search_contacts">Search contacts</string>
<string name="search_groups">Search group chats</string>
<string name="search_bookmarks">Search bookmarks</string>
<string name="send_private_message">Send private message</string>
<string name="user_has_left_conference">%1$s has left the group chat!</string>
<string name="username">Username</string>