diff options
| author | Bananeweizen <bananeweizen@gmx.de> | 2014-06-01 10:24:11 +0200 |
|---|---|---|
| committer | Bananeweizen <bananeweizen@gmx.de> | 2014-06-01 10:24:11 +0200 |
| commit | 1e914068d75298b46a6ccf2f6474eb5368edcb65 (patch) | |
| tree | 002548b723517083cb05044ca68c61ccfceccc5c /main/src | |
| parent | 752ad05506ca3e2bc3b11515c1e3720f2ed9352f (diff) | |
| download | cgeo-1e914068d75298b46a6ccf2f6474eb5368edcb65.zip cgeo-1e914068d75298b46a6ccf2f6474eb5368edcb65.tar.gz cgeo-1e914068d75298b46a6ccf2f6474eb5368edcb65.tar.bz2 | |
fix #3931: respect filter when switching lists
Diffstat (limited to 'main/src')
| -rw-r--r-- | main/src/cgeo/geocaching/CacheListActivity.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/main/src/cgeo/geocaching/CacheListActivity.java b/main/src/cgeo/geocaching/CacheListActivity.java index 46e2a0e..7749201 100644 --- a/main/src/cgeo/geocaching/CacheListActivity.java +++ b/main/src/cgeo/geocaching/CacheListActivity.java @@ -433,6 +433,11 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA */ CacheListSpinnerAdapter mCacheListSpinnerAdapter; + /** + * remember current filter when switching between lists, so it can be re-applied afterwards + */ + private IFilter currentFilter = null; + private void initActionBarSpinner() { mCacheListSpinnerAdapter = new CacheListSpinnerAdapter(this, R.layout.support_simple_spinner_dropdown_item); getSupportActionBar().setNavigationMode(ActionBar.NAVIGATION_MODE_LIST); @@ -937,6 +942,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA } private boolean setFilter(final IFilter filter) { + currentFilter = filter; adapter.setFilter(filter); prepareFilterBar(); updateTitle(); @@ -959,6 +965,7 @@ public class CacheListActivity extends AbstractListActivity implements FilteredA final ListView list = getListView(); registerForContextMenu(list); adapter = new CacheListAdapter(this, cacheList, type); + adapter.setFilter(currentFilter); if (listFooter == null) { listFooter = getLayoutInflater().inflate(R.layout.cacheslist_footer, null); |
