Re-sorted point context menu, to keep 'Navigate to point' and 'Route from' together, as well as 'Search POI' and 'Seacrh transport'.
This commit is contained in:
parent
72a288e212
commit
f225975aa1
1 changed files with 3 additions and 3 deletions
|
@ -1274,8 +1274,8 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso
|
|||
}
|
||||
final int[] contextMenuStandardActions = new int[]{
|
||||
R.string.context_menu_item_navigate_point,
|
||||
R.string.context_menu_item_search_poi,
|
||||
R.string.context_menu_item_show_route,
|
||||
R.string.context_menu_item_search_poi,
|
||||
R.string.context_menu_item_search_transport,
|
||||
R.string.context_menu_item_add_favorite,
|
||||
R.string.context_menu_item_share_location,
|
||||
|
@ -1300,14 +1300,14 @@ public class MapActivity extends Activity implements IMapLocationListener, Senso
|
|||
int standardId = contextMenuStandardActions[which - sizeAdditional];
|
||||
if(standardId == R.string.context_menu_item_navigate_point){
|
||||
navigateToPoint(new LatLon(latitude, longitude));
|
||||
} else if(standardId == R.string.context_menu_item_show_route){
|
||||
getDirections(latitude, longitude, false);
|
||||
} else if(standardId == R.string.context_menu_item_search_poi){
|
||||
Intent intent = new Intent(MapActivity.this, SearchPoiFilterActivity.class);
|
||||
intent.putExtra(SearchPoiFilterActivity.SEARCH_LAT, latitude);
|
||||
intent.putExtra(SearchPoiFilterActivity.SEARCH_LON, longitude);
|
||||
intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);
|
||||
startActivity(intent);
|
||||
} else if(standardId == R.string.context_menu_item_show_route){
|
||||
getDirections(latitude, longitude, false);
|
||||
} else if(standardId == R.string.context_menu_item_search_transport){
|
||||
Intent intent = new Intent(MapActivity.this, SearchTransportActivity.class);
|
||||
intent.putExtra(SearchTransportActivity.LAT_KEY, latitude);
|
||||
|
|
Loading…
Reference in a new issue