commit
95e824d4c8
4 changed files with 26 additions and 7 deletions
|
@ -9,6 +9,7 @@
|
|||
3. All your modified/created strings are in the top of the file (to make easier find what\'s translated).
|
||||
PLEASE: Have a look at http://code.google.com/p/osmand/wiki/UIConsistency, it may really improve your and our work :-) Thx - Hardy
|
||||
-->
|
||||
<string name="advanced_settings">Advanced</string>
|
||||
<string name="rendering_attr_publicTransportMode_name">Bus, trolleybus, shuttle routes</string>
|
||||
<string name="rendering_attr_tramTrainRoutes_name">Tram and train routes</string>
|
||||
<string name="rendering_attr_subwayMode_name">Subway routes</string>
|
||||
|
|
|
@ -348,8 +348,12 @@ public class MapActivityActions implements DialogProvider {
|
|||
standardId == R.string.context_menu_item_destination_point) {
|
||||
boolean dest = standardId == R.string.context_menu_item_destination_point;
|
||||
String selected = mapActivity.getMapLayers().getContextMenuLayer().getSelectedObjectName();
|
||||
String target = null;
|
||||
if(dest && selected != null){
|
||||
target = selected.replaceAll(getString(R.string.context_menu_item_destination_point), "");
|
||||
}
|
||||
targets.navigateToPoint(new LatLon(latitude, longitude), true,
|
||||
dest ? -1 : targets.getIntermediatePoints().size(), selected);
|
||||
dest ? -1 : targets.getIntermediatePoints().size(), dest? target : selected);
|
||||
if(targets.getIntermediatePoints().size() > 0) {
|
||||
openIntermediatePointsDialog();
|
||||
}
|
||||
|
@ -650,7 +654,7 @@ public class MapActivityActions implements DialogProvider {
|
|||
}
|
||||
|
||||
public void prepareConfigureMap() {
|
||||
prepareOptionsMenu(new ConfigureMapMenu().createListAdapter(mapActivity));
|
||||
prepareOptionsMenu(new ConfigureMapMenu().createListAdapter(mapActivity, true));
|
||||
}
|
||||
|
||||
private ContextMenuAdapter createOptionsMenu() {
|
||||
|
|
|
@ -35,7 +35,7 @@ public class ConfigureMapMenu {
|
|||
|
||||
private boolean allModes = false;
|
||||
|
||||
public ContextMenuAdapter createListAdapter(final MapActivity ma) {
|
||||
public ContextMenuAdapter createListAdapter(final MapActivity ma, final boolean advanced) {
|
||||
ContextMenuAdapter adapter = new ContextMenuAdapter(ma, allModes);
|
||||
adapter.setDefaultLayoutId(R.layout.drawer_list_item);
|
||||
adapter.item(R.string.configure_map).icons(R.drawable.ic_back_drawer_dark, R.drawable.ic_back_drawer_white)
|
||||
|
@ -52,12 +52,26 @@ public class ConfigureMapMenu {
|
|||
@Override
|
||||
public void onClick(boolean result) {
|
||||
allModes = true;
|
||||
ma.getMapActions().prepareOptionsMenu(createListAdapter(ma));
|
||||
ma.getMapActions().prepareOptionsMenu(createListAdapter(ma, advanced));
|
||||
}
|
||||
});
|
||||
|
||||
createLayersItems(adapter, ma);
|
||||
createRenderingAttributeItems(adapter, ma);
|
||||
if (!advanced){
|
||||
adapter.item(R.string.btn_advanced_mode).icons(R.drawable.ic_action_settings_dark, R.drawable.ic_action_settings_light)
|
||||
.selected(advanced ? 1 : 0)
|
||||
.listen(new OnContextMenuClick() {
|
||||
@Override
|
||||
public boolean onContextMenuClick(ArrayAdapter<?> adapter, int itemId, int pos, boolean isChecked) {
|
||||
ma.getMapActions().prepareOptionsMenu(createListAdapter(ma, isChecked));
|
||||
return false;
|
||||
}
|
||||
}).reg();
|
||||
}
|
||||
|
||||
if (advanced) {
|
||||
createRenderingAttributeItems(adapter, ma);
|
||||
}
|
||||
return adapter;
|
||||
}
|
||||
|
||||
|
@ -191,7 +205,7 @@ public class ConfigureMapMenu {
|
|||
}
|
||||
adapter.setItemDescription(pos, getRenderDescr(activity));
|
||||
dialog.dismiss();
|
||||
activity.getMapActions().prepareOptionsMenu(createListAdapter(activity));
|
||||
activity.getMapActions().prepareOptionsMenu(createListAdapter(activity, true));
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
@ -57,7 +57,7 @@ public class WaypointHelper {
|
|||
public static final int FAVORITES = 3;
|
||||
public static final int ALARMS = 4;
|
||||
public static final int MAX = 5;
|
||||
public static final int[] SEARCH_RADIUS_VALUES = {50, 100, 250, 500, 1000, 1500};
|
||||
public static final int[] SEARCH_RADIUS_VALUES = {50, 100, 150, 250, 500, 1000, 1500};
|
||||
|
||||
private List<List<LocationPointWrapper>> locationPoints = new ArrayList<List<LocationPointWrapper>>();
|
||||
private ConcurrentHashMap<LocationPoint, Integer> locationPointsStates = new ConcurrentHashMap<LocationPoint, Integer>();
|
||||
|
|
Loading…
Reference in a new issue