From a1686afc2434e799b3a1a47165eef19c2bca21bf Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Wed, 8 Apr 2015 17:01:42 +0200 Subject: [PATCH] Fix crash --- .../osmand/plus/activities/search/SearchPOIActivity.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java b/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java index 896e2cae16..31360ce141 100644 --- a/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java +++ b/OsmAnd/src/net/osmand/plus/activities/search/SearchPOIActivity.java @@ -118,6 +118,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa public boolean onMenuItemClick(MenuItem item) { if (searchFilterLayout.getVisibility() == View.GONE) { searchFilterLayout.setVisibility(View.VISIBLE); + searchFilter.requestFocus(); } else { if(filter != null) { searchFilter.setText(filter.getSavedFilterByName() == null ? "" : @@ -187,6 +188,8 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa setSupportProgressBarIndeterminateVisibility(false); app = (OsmandApplication) getApplication(); + amenityAdapter = new AmenityAdapter(new ArrayList()); + setListAdapter(amenityAdapter); searchFilterLayout = findViewById(R.id.SearchFilterLayout); searchFilter = (EditText) findViewById(R.id.edit); searchFilter.addTextChangedListener(new TextWatcher() { @@ -211,8 +214,7 @@ public class SearchPOIActivity extends OsmandListActivity implements OsmAndCompa } } }); - amenityAdapter = new AmenityAdapter(new ArrayList()); - setListAdapter(amenityAdapter); + }