fix small issues
git-svn-id: https://osmand.googlecode.com/svn/trunk@291 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
parent
24ccb2e33e
commit
c3d46c18a6
4 changed files with 18 additions and 6 deletions
|
@ -13,7 +13,7 @@ public class ToDoConstants {
|
||||||
*/
|
*/
|
||||||
public int DESCRIBE_ABOUT_AUTHORS = 8;
|
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
|
// TODO ANDROID
|
||||||
// 42. Revise UI (icons/layouts). Support different devices. Add inactive/focus(!) icon versions.
|
// 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 choose near by or last map selection [done]
|
||||||
// Show poi direction (using sensor) [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)
|
// Fix bugs with test data (bug with follow turn / left time / add turn)
|
||||||
// Improvement : Show stops in the transport route
|
// Improvement : Show stops in the transport route
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
<string name="search_poi_location">Поиск сигнала...</string>
|
||||||
<string name="search_near_map">Искать возле видимой карты</string>
|
<string name="search_near_map">Искать возле видимой карты</string>
|
||||||
<string name="search_nearby">Искать рядом</string>
|
<string name="search_nearby">Искать рядом</string>
|
||||||
<string name="map_orientation_default">По умолчанию</string>
|
<string name="map_orientation_default">По умолчанию</string>
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resources>
|
<resources>
|
||||||
|
<string name="search_poi_location">Searching signal...</string>
|
||||||
<string name="search_near_map">Search near last map location</string>
|
<string name="search_near_map">Search near last map location</string>
|
||||||
<string name="search_nearby">Search nearby</string>
|
<string name="search_nearby">Search nearby</string>
|
||||||
<string name="map_orientation_default">Default</string>
|
<string name="map_orientation_default">Default</string>
|
||||||
|
|
|
@ -160,15 +160,20 @@ public class SearchPOIActivity extends ListActivity implements LocationListener,
|
||||||
if (location == null) {
|
if (location == null) {
|
||||||
searchedLocation = l;
|
searchedLocation = l;
|
||||||
amenityAdapter.setNewModel(filter.initializeNewSearch(l.getLatitude(), l.getLongitude(), 40));
|
amenityAdapter.setNewModel(filter.initializeNewSearch(l.getLatitude(), l.getLongitude(), 40));
|
||||||
|
searchPOILevel.setText(R.string.search_POI_level_btn);
|
||||||
searchPOILevel.setEnabled(filter.isSearchFurtherAvailable());
|
searchPOILevel.setEnabled(filter.isSearchFurtherAvailable());
|
||||||
searchArea.setText(filter.getSearchArea());
|
searchArea.setText(filter.getSearchArea());
|
||||||
handled = true;
|
handled = true;
|
||||||
} else if (searchedLocation != null && l.distanceTo(searchedLocation) > 80) {
|
} else if (searchedLocation != null && l.distanceTo(searchedLocation) > 80) {
|
||||||
amenityAdapter.setNewModel(filter.searchAgain(l.getLatitude(), l.getLongitude()));
|
amenityAdapter.setNewModel(filter.searchAgain(l.getLatitude(), l.getLongitude()));
|
||||||
searchPOILevel.setEnabled(filter.isSearchFurtherAvailable());
|
|
||||||
searchArea.setText(filter.getSearchArea());
|
|
||||||
handled = true;
|
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;
|
handled = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -223,7 +228,7 @@ public class SearchPOIActivity extends ListActivity implements LocationListener,
|
||||||
@Override
|
@Override
|
||||||
public void onSensorChanged(SensorEvent event) {
|
public void onSensorChanged(SensorEvent event) {
|
||||||
// Attention : sensor produces a lot of events & can hang the system
|
// 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
|
// this is very small variation
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -262,6 +267,11 @@ public class SearchPOIActivity extends ListActivity implements LocationListener,
|
||||||
} else {
|
} else {
|
||||||
searchPOILevel.setEnabled(false);
|
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);
|
showOnMap.setEnabled(filter != null);
|
||||||
if (searchNearBy) {
|
if (searchNearBy) {
|
||||||
LocationManager service = (LocationManager) getSystemService(LOCATION_SERVICE);
|
LocationManager service = (LocationManager) getSystemService(LOCATION_SERVICE);
|
||||||
|
|
Loading…
Reference in a new issue