fixed regression of search hint not updating in StartConversation screen
This commit is contained in:
parent
6b5e81df49
commit
f26a57ced4
|
@ -19,6 +19,7 @@ import android.support.v4.app.Fragment;
|
||||||
import android.support.v4.app.FragmentManager;
|
import android.support.v4.app.FragmentManager;
|
||||||
import android.support.v4.app.FragmentTransaction;
|
import android.support.v4.app.FragmentTransaction;
|
||||||
import android.support.v4.view.PagerAdapter;
|
import android.support.v4.view.PagerAdapter;
|
||||||
|
import android.support.v4.view.ViewPager;
|
||||||
import android.support.v4.widget.SwipeRefreshLayout;
|
import android.support.v4.widget.SwipeRefreshLayout;
|
||||||
import android.support.v7.app.ActionBar;
|
import android.support.v7.app.ActionBar;
|
||||||
import android.support.v7.app.AlertDialog;
|
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.speedDial.inflate(R.menu.start_conversation_fab_submenu);
|
||||||
|
|
||||||
binding.tabLayout.setupWithViewPager(binding.startConversationViewPager);
|
binding.tabLayout.setupWithViewPager(binding.startConversationViewPager);
|
||||||
|
binding.startConversationViewPager.addOnPageChangeListener(new ViewPager.SimpleOnPageChangeListener() {
|
||||||
|
@Override
|
||||||
|
public void onPageSelected(int position) {
|
||||||
|
updateSearchViewHint();
|
||||||
|
}
|
||||||
|
});
|
||||||
mListPagerAdapter = new ListPagerAdapter(getSupportFragmentManager());
|
mListPagerAdapter = new ListPagerAdapter(getSupportFragmentManager());
|
||||||
binding.startConversationViewPager.setAdapter(mListPagerAdapter);
|
binding.startConversationViewPager.setAdapter(mListPagerAdapter);
|
||||||
|
|
||||||
|
@ -603,7 +610,7 @@ public class StartConversationActivity extends XmppActivity implements XmppConne
|
||||||
if (binding.startConversationViewPager.getCurrentItem() == 0) {
|
if (binding.startConversationViewPager.getCurrentItem() == 0) {
|
||||||
mSearchEditText.setHint(R.string.search_contacts);
|
mSearchEditText.setHint(R.string.search_contacts);
|
||||||
} else {
|
} else {
|
||||||
mSearchEditText.setHint(R.string.search_groups);
|
mSearchEditText.setHint(R.string.search_bookmarks);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -442,7 +442,7 @@
|
||||||
<string name="recently_used">Most recently used</string>
|
<string name="recently_used">Most recently used</string>
|
||||||
<string name="choose_quick_action">Choose quick action</string>
|
<string name="choose_quick_action">Choose quick action</string>
|
||||||
<string name="search_contacts">Search contacts</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="send_private_message">Send private message</string>
|
||||||
<string name="user_has_left_conference">%1$s has left the group chat!</string>
|
<string name="user_has_left_conference">%1$s has left the group chat!</string>
|
||||||
<string name="username">Username</string>
|
<string name="username">Username</string>
|
||||||
|
|
Loading…
Reference in New Issue