From 2c6acbefac58e4bccbc001ee52dea6e0a74d2f1f Mon Sep 17 00:00:00 2001 From: hemanggs Date: Sat, 15 Mar 2025 17:35:24 +0530 Subject: [PATCH] [UI] zoom buttons on small screens fix Signed-off-by: hemanggs --- .../app/organicmaps/maplayer/MapButtonsController.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/android/app/src/main/java/app/organicmaps/maplayer/MapButtonsController.java b/android/app/src/main/java/app/organicmaps/maplayer/MapButtonsController.java index 8f53e4387d..d7a496ccca 100644 --- a/android/app/src/main/java/app/organicmaps/maplayer/MapButtonsController.java +++ b/android/app/src/main/java/app/organicmaps/maplayer/MapButtonsController.java @@ -306,7 +306,15 @@ public class MapButtonsController extends Fragment { final View button = entry.getValue(); if (button.getParent() == parent) - showButton(getViewTopOffset(translation, button) >= 0, entry.getKey()); + { + boolean show = getViewTopOffset(translation, button) >= 0; + // Allow offset tolerance for zoom buttons + if (entry.getKey() == MapButtons.zoomIn || entry.getKey() == MapButtons.zoomOut|| entry.getKey() == MapButtons.zoom) + { + show = getViewTopOffset(translation, button) >= -140; + } + showButton(show, entry.getKey()); + } } }