[android] Bookmark button now shows "Save" and "Delete" instead of just "Bookmark"

The behavior was fixed to represent the current iOS implementation and to avoid
accidental delete (now it's very clear for the user).

Signed-off-by: Alexander Borsuk <me@alex.bio>
This commit is contained in:
Alexander Borsuk 2021-08-25 19:32:32 +02:00 committed by Alexander Borsuk
parent 9c2d9205f6
commit a274773b42
2 changed files with 9 additions and 3 deletions

View file

@ -171,8 +171,13 @@ public final class PlacePageButtons
},
ButtonType.BACK),
BOOKMARK(
R.string.bookmark,
BOOKMARK_SAVE(
R.string.save,
new ImageResources(R.drawable.ic_bookmarks_on),
ButtonType.BOOKMARK),
BOOKMARK_DELETE(
R.string.delete,
new ImageResources(R.drawable.ic_bookmarks_off),
ButtonType.BOOKMARK),

View file

@ -1000,7 +1000,8 @@ public class PlacePageView extends NestedScrollViewClickFixed
if (needToShowRoutingButtons && !hasNumber)
buttons.add(PlacePageButtons.Item.ROUTE_FROM);
buttons.add(PlacePageButtons.Item.BOOKMARK);
buttons.add(mapObject.getMapObjectType() == MapObject.BOOKMARK ? PlacePageButtons.Item.BOOKMARK_DELETE
: PlacePageButtons.Item.BOOKMARK_SAVE);
if (needToShowRoutingButtons)
{