This commit is contained in:
xmd5a 2016-11-21 11:15:02 +03:00
commit 68e34148f3
2 changed files with 12 additions and 10 deletions

View file

@ -13,6 +13,7 @@
<string name="routing_attr_avoid_motorway_name">Avoid motorways</string>
<string name="routing_attr_avoid_motorway_description">Avoid motorways</string>
<string name="upload_osm_note_description">You can upload your OSM Note anonymously if you use your OpenStreetMap.org profile.</string>
<string name="upload_osm_note_description">You can upload your OSM Note anonymously or using your OpenStreetMap.org profile.</string>
<string name="wiki_around">Nearby Wikipedia articles</string>
<string name="search_map_hint">Search city or region</string>
<string name="route_roundabout_short">Take %1$d exit and go</string>

View file

@ -571,7 +571,6 @@ public class MapActivityActions implements DialogProvider {
public ContextMenuAdapter createMainOptionsMenu() {
final OsmandMapTileView mapView = mapActivity.getMapView();
int viewHeight = mapView.getViewHeight();
final OsmandApplication app = mapActivity.getMyApplication();
ContextMenuAdapter optionsMenuHelper = new ContextMenuAdapter();
@ -645,6 +644,17 @@ public class MapActivityActions implements DialogProvider {
}
}).createItem());
optionsMenuHelper.addItem(new ContextMenuItem.ItemBuilder().setTitleId(R.string.configure_map, mapActivity)
.setIcon(R.drawable.ic_action_layers_dark)
.setListener(new ContextMenuAdapter.ItemClickListener() {
@Override
public boolean onContextMenuClick(ArrayAdapter<ContextMenuItem> adapter, int itemId, int pos, boolean isChecked) {
MapActivity.clearPrevActivityIntent();
mapActivity.getDashboard().setDashboardVisibility(true, DashboardType.CONFIGURE_MAP);
return false;
}
}).createItem());
optionsMenuHelper.addItem(new ItemBuilder().setTitleId(R.string.get_directions, mapActivity)
.setIcon(R.drawable.ic_action_gdirections_dark)
.setListener(new ContextMenuAdapter.ItemClickListener() {
@ -779,15 +789,6 @@ public class MapActivityActions implements DialogProvider {
}
ItemBuilder divider = new ItemBuilder().setLayout(R.layout.drawer_divider);
if (viewHeight > 0) {
int listItemHeight = app.getResources().getDimensionPixelSize(R.dimen.list_item_height);
int dividerHeight = viewHeight - optionsMenuHelper.length() * listItemHeight;
if (dividerHeight > 0) {
divider.setMinHeight(dividerHeight);
} else if (dividerHeight < 0) {
divider.setMinHeight(AndroidUtils.dpToPx(app, 16f));
}
}
divider.setPosition(pluginsItemIndex >= 0 ? pluginsItemIndex : 7);
optionsMenuHelper.addItem(divider.createItem());