This commit is contained in:
Alexey Kulish 2016-11-21 10:47:56 +03:00
parent 8059e46cc2
commit b15aca3570

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();
@ -790,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());