diff --git a/android/res/values/integer.xml b/android/res/values/integer.xml index ddfdee6f78..ac7eabf4ca 100644 --- a/android/res/values/integer.xml +++ b/android/res/values/integer.xml @@ -1,6 +1,6 @@ 5 - 5 + 4 500 diff --git a/android/src/app/organicmaps/widget/placepage/PlacePageController.java b/android/src/app/organicmaps/widget/placepage/PlacePageController.java index 504e5a61ab..590929cb26 100644 --- a/android/src/app/organicmaps/widget/placepage/PlacePageController.java +++ b/android/src/app/organicmaps/widget/placepage/PlacePageController.java @@ -458,15 +458,22 @@ public class PlacePageController implements Initializable, if (needToShowRoutingButtons) buttons.add(PlacePageButtons.ButtonType.ROUTE_FROM); - buttons.add(mapObject.getMapObjectType() == MapObject.BOOKMARK - ? PlacePageButtons.ButtonType.BOOKMARK_DELETE - : PlacePageButtons.ButtonType.BOOKMARK_SAVE); + // If we can show the add route button, put it in the place of the bookmark button + // And move the bookmark button at the end + if (needToShowRoutingButtons && RoutingController.get().isStopPointAllowed()) + buttons.add(PlacePageButtons.ButtonType.ROUTE_ADD); + else + buttons.add(mapObject.getMapObjectType() == MapObject.BOOKMARK + ? PlacePageButtons.ButtonType.BOOKMARK_DELETE + : PlacePageButtons.ButtonType.BOOKMARK_SAVE); if (needToShowRoutingButtons) { buttons.add(PlacePageButtons.ButtonType.ROUTE_TO); if (RoutingController.get().isStopPointAllowed()) - buttons.add(PlacePageButtons.ButtonType.ROUTE_ADD); + buttons.add(mapObject.getMapObjectType() == MapObject.BOOKMARK + ? PlacePageButtons.ButtonType.BOOKMARK_DELETE + : PlacePageButtons.ButtonType.BOOKMARK_SAVE); } buttons.add(PlacePageButtons.ButtonType.SHARE); }