diff --git a/DataExtractionOSM/src/com/osmand/ToDoConstants.java b/DataExtractionOSM/src/com/osmand/ToDoConstants.java index b8d44b8dca..10492dea81 100644 --- a/DataExtractionOSM/src/com/osmand/ToDoConstants.java +++ b/DataExtractionOSM/src/com/osmand/ToDoConstants.java @@ -13,7 +13,7 @@ public class ToDoConstants { */ public int DESCRIBE_ABOUT_AUTHORS = 8; - // Prepare update : android description, sites, screenshots + // Prepare update : android description, sites(osmand/wiki), screenshots, Amerika indexes & poi/transport.index // TODO ANDROID // 42. Revise UI (icons/layouts). Support different devices. Add inactive/focus(!) icon versions. @@ -45,7 +45,7 @@ public class ToDoConstants { // show POI choose near by or last map selection [done] // Show poi direction (using sensor) [done] - // hide center point (enable only when trackball using)? + // hide center point (enable only when trackball using) [hide with delay 500 ms]? // Fix bugs with test data (bug with follow turn / left time / add turn) // Improvement : Show stops in the transport route diff --git a/OsmAnd/res/values-ru-rRU/strings.xml b/OsmAnd/res/values-ru-rRU/strings.xml index 368daca821..b7f5de9a83 100644 --- a/OsmAnd/res/values-ru-rRU/strings.xml +++ b/OsmAnd/res/values-ru-rRU/strings.xml @@ -1,5 +1,6 @@ + Поиск сигнала... Искать возле видимой карты Искать рядом По умолчанию diff --git a/OsmAnd/res/values/strings.xml b/OsmAnd/res/values/strings.xml index 10487789f9..e3ea578c6c 100644 --- a/OsmAnd/res/values/strings.xml +++ b/OsmAnd/res/values/strings.xml @@ -1,5 +1,6 @@ + Searching signal... Search near last map location Search nearby Default diff --git a/OsmAnd/src/com/osmand/activities/search/SearchPOIActivity.java b/OsmAnd/src/com/osmand/activities/search/SearchPOIActivity.java index 4fbc29e2f1..ac14a0f5a1 100644 --- a/OsmAnd/src/com/osmand/activities/search/SearchPOIActivity.java +++ b/OsmAnd/src/com/osmand/activities/search/SearchPOIActivity.java @@ -160,15 +160,20 @@ public class SearchPOIActivity extends ListActivity implements LocationListener, if (location == null) { searchedLocation = l; amenityAdapter.setNewModel(filter.initializeNewSearch(l.getLatitude(), l.getLongitude(), 40)); + searchPOILevel.setText(R.string.search_POI_level_btn); searchPOILevel.setEnabled(filter.isSearchFurtherAvailable()); searchArea.setText(filter.getSearchArea()); handled = true; } else if (searchedLocation != null && l.distanceTo(searchedLocation) > 80) { amenityAdapter.setNewModel(filter.searchAgain(l.getLatitude(), l.getLongitude())); - searchPOILevel.setEnabled(filter.isSearchFurtherAvailable()); - searchArea.setText(filter.getSearchArea()); handled = true; - } else if(location.distanceTo(l) > 8){ + } else if(location.distanceTo(l) > 6){ + handled = true; + } + } else { + if(location != null){ + searchPOILevel.setText(R.string.search_poi_location); + searchPOILevel.setEnabled(false); handled = true; } } @@ -223,7 +228,7 @@ public class SearchPOIActivity extends ListActivity implements LocationListener, @Override public void onSensorChanged(SensorEvent event) { // Attention : sensor produces a lot of events & can hang the system - if(heading != null && heading - event.values[0] < 4){ + if(heading != null && Math.abs(heading - event.values[0]) < 4){ // this is very small variation return; } @@ -262,6 +267,11 @@ public class SearchPOIActivity extends ListActivity implements LocationListener, } else { searchPOILevel.setEnabled(false); } + if(searchNearBy && location == null){ + searchPOILevel.setText(R.string.search_poi_location); + } else { + searchPOILevel.setText(R.string.search_POI_level_btn); + } showOnMap.setEnabled(filter != null); if (searchNearBy) { LocationManager service = (LocationManager) getSystemService(LOCATION_SERVICE);