android: allow up to 5 place page buttons

Signed-off-by: Arnaud Vergnet <arnaud.vergnet@mailo.com>
This commit is contained in:
Arnaud Vergnet 2023-02-17 20:40:28 +01:00 committed by Viktor Govako
parent 82406e5f09
commit 2912ca6a5d
2 changed files with 5 additions and 12 deletions

View file

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<integer name="pp_title_lines">5</integer>
<integer name="pp_buttons_max">4</integer>
<integer name="pp_buttons_max">5</integer>
<integer name="place_page_description_max_length">500</integer>
</resources>

View file

@ -445,22 +445,15 @@ public class PlacePageController implements Initializable<Activity>,
if (needToShowRoutingButtons)
buttons.add(PlacePageButtons.ButtonType.ROUTE_FROM);
// 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(mMapObject.getMapObjectType() == MapObject.BOOKMARK
? PlacePageButtons.ButtonType.BOOKMARK_DELETE
: PlacePageButtons.ButtonType.BOOKMARK_SAVE);
buttons.add(mMapObject.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(mMapObject.getMapObjectType() == MapObject.BOOKMARK
? PlacePageButtons.ButtonType.BOOKMARK_DELETE
: PlacePageButtons.ButtonType.BOOKMARK_SAVE);
buttons.add(PlacePageButtons.ButtonType.ROUTE_ADD);
}
buttons.add(PlacePageButtons.ButtonType.SHARE);
}