Commit 7e6b5d6c authored by Grigory Fedorov's avatar Grigory Fedorov

ContactList: search view "x" button now collapses search field.

parent f62fb1db
......@@ -321,13 +321,14 @@ public class ContactList extends ManagedActivity implements
return true;
}
private void setUpSearchView(Menu menu) {
private void setUpSearchView(final Menu menu) {
searchView = (SearchView) menu.findItem(R.id.action_search).getActionView();
searchView.setQueryHint("Search contact");
searchView.setOnCloseListener(new SearchView.OnCloseListener() {
@Override
public boolean onClose() {
menu.findItem(R.id.action_search).collapseActionView();
return true;
}
});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment