fix small issues
git-svn-id: https://osmand.googlecode.com/svn/trunk@121 e29c36b1-1cfa-d876-8d93-3434fc2bb7b8
This commit is contained in:
parent
962b79e948
commit
c1d66edd20
6 changed files with 35 additions and 26 deletions
|
@ -13,7 +13,6 @@ public class ToDoConstants {
|
|||
|
||||
|
||||
// TODO ANDROID in release 0.1
|
||||
// 29. Show opened/closed amenities (in search poi).
|
||||
// 13. Save point as favorite & introduce favorite points dialog
|
||||
// 3. Revise osmand UI. Preparing new icons (revise UI 18, 2, ). Main application icon, back to location icon.
|
||||
// 14. Show zoom level on map
|
||||
|
@ -23,23 +22,20 @@ public class ToDoConstants {
|
|||
// 16. Support open street bugs api.
|
||||
// 20. Implement save track/route to gpx (?)
|
||||
// 26. Show the whole street on map (when it is chosen in search activity). Possibly extend that story to show layer with streets.
|
||||
// 30. Performance issue : introduce one place where refreshMap will be called using postMessage mechanism (delay more than > 50 ? ms).
|
||||
// 30. Performance issue with map drawing :
|
||||
// introduce one place where refreshMap will be called using postMessage mechanism (delay more than > 50 ? ms).
|
||||
// Introducing cache of file names that are on disk (creating new File() consumes a lot of memory)
|
||||
|
||||
|
||||
// FIXME Bugs Android :
|
||||
// 6. Understand concept of application where to save/restore global setting.
|
||||
// (for example reset navigate to point, reset link map with location). It should be reset after user call exit.
|
||||
// Call ResourceManager.close when it is needed (+)
|
||||
// 10. Notification is gone after clear all notifications
|
||||
// Performance improvements Android :
|
||||
// 2. Introducing cache of file names that are on disk (creating new File() consumes a lot of memory) (+)
|
||||
|
||||
// 10. Notification is gone after clear all notifications (TODO test)
|
||||
|
||||
// TODO swing NOT in release 0.1
|
||||
// 1. Download tiles without using dir tiles
|
||||
|
||||
|
||||
// DONE ANDROID :
|
||||
// 29. Show opened/closed amenities (in search poi).
|
||||
|
||||
// DONE SWING
|
||||
}
|
||||
|
|
|
@ -49,5 +49,5 @@
|
|||
<string name="incremental_search_building">Search building incrementally</string>
|
||||
<string name="choose_available_region">Choose region</string>
|
||||
<string name="choose_intersected_street">Choose intersected street</string>
|
||||
<string name="Closest_Anemities">Closest Anemities</string>
|
||||
<string name="Closest_Amenities">Closest amenities</string>
|
||||
</resources>
|
||||
|
|
|
@ -132,19 +132,32 @@ public class MainMenuActivity extends Activity {
|
|||
startActivity(search);
|
||||
}
|
||||
});
|
||||
/*
|
||||
|
||||
/*
|
||||
exitButton = (Button) findViewById(R.id.ExitButton);
|
||||
exitButton.setOnClickListener(new OnClickListener() {
|
||||
@Override
|
||||
public void onClick(View v) {
|
||||
mNotificationManager.cancel(APP_NOTIFICATION_ID);
|
||||
MainMenuActivity.this.finish();
|
||||
finishApplication();
|
||||
}
|
||||
});*/
|
||||
}); */
|
||||
|
||||
startApplication();
|
||||
}
|
||||
|
||||
protected void finishApplication(){
|
||||
mNotificationManager.cancel(APP_NOTIFICATION_ID);
|
||||
boolean force = false;
|
||||
ResourceManager.getResourceManager().close();
|
||||
applicationAlreadyStarted = false;
|
||||
if (force) {
|
||||
int pid = android.os.Process.myPid();
|
||||
android.os.Process.killProcess(pid);
|
||||
} else {
|
||||
MainMenuActivity.this.finish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||
if (keyCode == KeyEvent.KEYCODE_SEARCH
|
||||
|
|
|
@ -286,7 +286,7 @@ public class SearchAddressActivity extends Activity {
|
|||
Long cityId = OsmandSettings.getLastSearchedCity(this);
|
||||
if (!region.areCitiesPreloaded()) {
|
||||
progressMsg = "Loading cities...";
|
||||
} else if (cityId != -1 && region.getCityById(cityId).isEmptyWithStreets()) {
|
||||
} else if (cityId != -1 && region.getCityById(cityId) != null && region.getCityById(cityId).isEmptyWithStreets()) {
|
||||
progressMsg = "Loading streets/buildings...";
|
||||
} else if (OsmandSettings.usingEnglishNames(this) != region.useEnglishNames()) {
|
||||
progressMsg = "Converting native/english names...";
|
||||
|
|
|
@ -37,7 +37,7 @@ import com.osmand.osm.MapUtils;
|
|||
*/
|
||||
public class SearchPOIActivity extends ListActivity {
|
||||
|
||||
public static final String ANENITY_TYPE = "amenity_type";
|
||||
public static final String AMENITY_TYPE = "amenity_type";
|
||||
|
||||
private List<Amenity> amenityList;
|
||||
|
||||
|
@ -76,7 +76,7 @@ public class SearchPOIActivity extends ListActivity {
|
|||
});
|
||||
|
||||
Bundle bundle = this.getIntent().getExtras();
|
||||
String anemity = bundle.getString(ANENITY_TYPE);
|
||||
String anemity = bundle.getString(AMENITY_TYPE);
|
||||
if (anemity != null) {
|
||||
ResourceManager resourceManager = ResourceManager.getResourceManager();
|
||||
lastKnownMapLocation = OsmandSettings.getLastKnownMapLocation(this);
|
||||
|
@ -86,7 +86,7 @@ public class SearchPOIActivity extends ListActivity {
|
|||
.getLongitude(), zoom, maxCount);
|
||||
} else {
|
||||
amenityList = resourceManager.searchAmenities(amenityType, lastKnownMapLocation.getLatitude(), lastKnownMapLocation
|
||||
.getLongitude(), zoom, 15);
|
||||
.getLongitude(), zoom, 30);
|
||||
}
|
||||
|
||||
if (amenityList != null) {
|
||||
|
@ -104,10 +104,10 @@ public class SearchPOIActivity extends ListActivity {
|
|||
public boolean onItemLongClick(AdapterView<?> av, View v, int pos, long id) {
|
||||
Amenity amenity = amenityList.get(pos);
|
||||
String format = amenity.getSimpleFormat(OsmandSettings.usingEnglishNames(v.getContext()));
|
||||
if(amenity.getOpeningHours() != null){
|
||||
format += "\n Opening hours : " + amenity.getOpeningHours();
|
||||
if (amenity.getOpeningHours() != null) {
|
||||
format += "\nOpening hours : " + amenity.getOpeningHours();
|
||||
}
|
||||
Toast.makeText(v.getContext(), format, Toast.LENGTH_SHORT).show();
|
||||
Toast.makeText(v.getContext(), format, Toast.LENGTH_LONG).show();
|
||||
return true;
|
||||
}
|
||||
});
|
||||
|
|
|
@ -39,7 +39,7 @@ public class SearchPOIListActivity extends ListActivity {
|
|||
}
|
||||
|
||||
private void createAmenityTypeList() {
|
||||
amenityList.add(getResources().getString(R.string.Closest_Anemities));
|
||||
amenityList.add(getResources().getString(R.string.Closest_Amenities));
|
||||
for (AmenityType type : AmenityType.values()) {
|
||||
amenityList.add(Algoritms.capitalizeFirstLetterAndLowercase(type.toString()));
|
||||
}
|
||||
|
@ -52,9 +52,9 @@ public class SearchPOIListActivity extends ListActivity {
|
|||
Intent newIntent = new Intent(SearchPOIListActivity.this, SearchPOIActivity.class);
|
||||
// folder selected
|
||||
if (amenityType != null) {
|
||||
bundle.putString(SearchPOIActivity.ANENITY_TYPE, amenityList.get(position));
|
||||
bundle.putString(SearchPOIActivity.AMENITY_TYPE, amenityList.get(position));
|
||||
} else {
|
||||
bundle.putString(SearchPOIActivity.ANENITY_TYPE, "Closest_Anenities");
|
||||
bundle.putString(SearchPOIActivity.AMENITY_TYPE, "Closest_Amenities");
|
||||
}
|
||||
newIntent.putExtras(bundle);
|
||||
startActivityForResult(newIntent, 0);
|
||||
|
|
Loading…
Reference in a new issue