Merge remote-tracking branch 'origin/master'

This commit is contained in:
Weblate 2016-10-25 22:11:36 +02:00
commit 3d50c728eb

View file

@ -770,6 +770,14 @@ public class MapActivityActions implements DialogProvider {
//////////// Others
OsmandPlugin.registerOptionsMenu(mapActivity, optionsMenuHelper);
int pluginsItemIndex = -1;
for (int i = 0; i < optionsMenuHelper.length(); i++) {
if (optionsMenuHelper.getItem(i).getTitleId() == R.string.prefs_plugins) {
pluginsItemIndex = i;
break;
}
}
ItemBuilder divider = new ItemBuilder().setLayout(R.layout.drawer_divider);
if (viewHeight > 0) {
int listItemHeight = app.getResources().getDimensionPixelSize(R.dimen.list_item_height);
@ -780,7 +788,7 @@ public class MapActivityActions implements DialogProvider {
divider.setMinHeight(AndroidUtils.dpToPx(app, 16f));
}
}
divider.setPosition(7);
divider.setPosition(pluginsItemIndex >= 0 ? pluginsItemIndex : 7);
optionsMenuHelper.addItem(divider.createItem());
getMyApplication().getAppCustomization().prepareOptionsMenu(mapActivity, optionsMenuHelper);