aboutsummaryrefslogtreecommitdiffstats
path: root/main
diff options
context:
space:
mode:
authorBananeweizen <bananeweizen@gmx.de>2014-06-01 10:24:11 +0200
committerBananeweizen <bananeweizen@gmx.de>2014-06-01 10:24:11 +0200
commit1e914068d75298b46a6ccf2f6474eb5368edcb65 (patch)
tree002548b723517083cb05044ca68c61ccfceccc5c /main
parent752ad05506ca3e2bc3b11515c1e3720f2ed9352f (diff)
downloadcgeo-1e914068d75298b46a6ccf2f6474eb5368edcb65.zip
cgeo-1e914068d75298b46a6ccf2f6474eb5368edcb65.tar.gz
cgeo-1e914068d75298b46a6ccf2f6474eb5368edcb65.tar.bz2
fix #3931: respect filter when switching lists
Diffstat (limited to 'main')
-rw-r--r--main/src/cgeo/geocaching/CacheListActivity.java7
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);