diff options
Diffstat (limited to 'src/de/danoeh/antennapod/activity')
-rw-r--r-- | src/de/danoeh/antennapod/activity/FeedItemlistActivity.java | 2 | ||||
-rw-r--r-- | src/de/danoeh/antennapod/activity/MainActivity.java | 7 | ||||
-rw-r--r-- | src/de/danoeh/antennapod/activity/SearchActivity.java | 4 |
3 files changed, 11 insertions, 2 deletions
diff --git a/src/de/danoeh/antennapod/activity/FeedItemlistActivity.java b/src/de/danoeh/antennapod/activity/FeedItemlistActivity.java index ee4e39b9d..8fba44e5c 100644 --- a/src/de/danoeh/antennapod/activity/FeedItemlistActivity.java +++ b/src/de/danoeh/antennapod/activity/FeedItemlistActivity.java @@ -124,6 +124,8 @@ public class FeedItemlistActivity extends ActionBarActivity { SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE); SearchView searchView = (SearchView) MenuItemCompat.getActionView(menu.findItem(R.id.search_item)); + + searchView.setIconifiedByDefault(true); searchView.setSearchableInfo( diff --git a/src/de/danoeh/antennapod/activity/MainActivity.java b/src/de/danoeh/antennapod/activity/MainActivity.java index 447a436cf..4f25a07f1 100644 --- a/src/de/danoeh/antennapod/activity/MainActivity.java +++ b/src/de/danoeh/antennapod/activity/MainActivity.java @@ -183,7 +183,12 @@ public class MainActivity extends ActionBarActivity { SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE); - SearchView searchView = (SearchView) MenuItemCompat.getActionView(menu.findItem(R.id.search_item)); + MenuItem searchItem = menu.findItem(R.id.search_item); + SearchView searchView = (SearchView) MenuItemCompat.getActionView(searchItem); + if (searchView == null) { + MenuItemCompat.setActionView(searchItem, new SearchView(this)); + searchView = (SearchView) MenuItemCompat.getActionView(searchItem); + } searchView.setIconifiedByDefault(true); SearchableInfo info = searchManager.getSearchableInfo(getComponentName()); diff --git a/src/de/danoeh/antennapod/activity/SearchActivity.java b/src/de/danoeh/antennapod/activity/SearchActivity.java index 257ae86ae..29d55c102 100644 --- a/src/de/danoeh/antennapod/activity/SearchActivity.java +++ b/src/de/danoeh/antennapod/activity/SearchActivity.java @@ -154,7 +154,9 @@ public class SearchActivity extends ActionBarActivity implements AdapterView.OnI + " results"); searchAdapter.clear(); - searchAdapter.addAll(result); + for (SearchResult s : result) { + searchAdapter.add(s); + } searchAdapter.notifyDataSetChanged(); txtvStatus .setText(R.string.search_status_no_results); |