Last active
July 27, 2018 08:52
-
-
Save piotrmadry/dbb59588996cc6dbd52dcc5cf13242b2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
protected FragmentToolbar builder() { | |
return new FragmentToolbar.Builder() | |
.withId(R.id.toolbar) | |
.withTitle(R.string.toolbar_title) | |
.withMenu(R.menu.menu_options) | |
.withSearchAndFilters(new SearchView.OnQueryTextListener() { | |
@Override | |
public boolean onQueryTextSubmit(final String query) { | |
return false; | |
} | |
@Override | |
public boolean onQueryTextChange(final String newText) { | |
doActionWithQuery(newText); | |
return false; | |
} | |
}, filterClick -> { | |
openDrawer(); | |
return false; | |
}) | |
.withSearchHint(R.string.search_view_hint) | |
.onHomePressedDefaultAction() | |
.build(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment