diff options
author | ByteHamster <info@bytehamster.com> | 2019-08-30 23:22:40 +0200 |
---|---|---|
committer | ByteHamster <info@bytehamster.com> | 2019-08-30 23:22:40 +0200 |
commit | 0333b2cecfdc7ba100d51673f826b69d9f5af842 (patch) | |
tree | f4e79ac0a13bb51185d2f15c7c0ff1f0ace23ca3 /app/src/main/java/de/danoeh/antennapod | |
parent | 8a3e4f8765c0836a59f8adc5fbc531466774cf38 (diff) | |
download | AntennaPod-0333b2cecfdc7ba100d51673f826b69d9f5af842.zip |
Collapse search view
Diffstat (limited to 'app/src/main/java/de/danoeh/antennapod')
-rw-r--r-- | app/src/main/java/de/danoeh/antennapod/fragment/FeedItemlistFragment.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/app/src/main/java/de/danoeh/antennapod/fragment/FeedItemlistFragment.java b/app/src/main/java/de/danoeh/antennapod/fragment/FeedItemlistFragment.java index c23efc2ff..4e4b40096 100644 --- a/app/src/main/java/de/danoeh/antennapod/fragment/FeedItemlistFragment.java +++ b/app/src/main/java/de/danoeh/antennapod/fragment/FeedItemlistFragment.java @@ -195,6 +195,21 @@ public class FeedItemlistFragment extends ListFragment { final SearchView sv = (SearchView) MenuItemCompat.getActionView(searchItem); MenuItemUtils.adjustTextColor(getActivity(), sv); sv.setQueryHint(getString(R.string.search_hint)); + searchItem.setOnActionExpandListener(new MenuItem.OnActionExpandListener() { + @Override + public boolean onMenuItemActionExpand(MenuItem item) { + menu.findItem(R.id.filter_items).setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER); + menu.findItem(R.id.episode_actions).setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER); + menu.findItem(R.id.refresh_item).setShowAsAction(MenuItem.SHOW_AS_ACTION_NEVER); + return true; + } + + @Override + public boolean onMenuItemActionCollapse(MenuItem item) { + getActivity().invalidateOptionsMenu(); + return true; + } + }); sv.setOnQueryTextListener(new SearchView.OnQueryTextListener() { @Override public boolean onQueryTextSubmit(String s) { |