From f353d07271768d9ac7f2358cc31a68fdc73b04c3 Mon Sep 17 00:00:00 2001 From: drdev Date: Sun, 24 May 2015 22:43:14 +0000 Subject: [PATCH] Prevent ability to scroll slightly --- .../src/forge/screens/match/views/VZoneDisplay.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/forge-gui-mobile/src/forge/screens/match/views/VZoneDisplay.java b/forge-gui-mobile/src/forge/screens/match/views/VZoneDisplay.java index 381b73de1a1..3ad6278429c 100644 --- a/forge-gui-mobile/src/forge/screens/match/views/VZoneDisplay.java +++ b/forge-gui-mobile/src/forge/screens/match/views/VZoneDisplay.java @@ -155,6 +155,7 @@ public class VZoneDisplay extends VCardDisplayArea { float cardWidth = visibleWidth / 2; float cardHeight = getCardHeight(cardWidth); float dy = cardHeight; + float scrollHeight; int rowCount = (int)Math.ceil((float)cardPanels.size() / 2f); float totalHeight = cardHeight * rowCount; @@ -166,9 +167,11 @@ public class VZoneDisplay extends VCardDisplayArea { if (revealedPanel == null) { revealedPanel = cardPanels.get(cardPanels.size() - 1); } + scrollHeight = visibleHeight; } else { revealedPanel = null; + scrollHeight = rowCount * dy; } for (CardAreaPanel cardPanel : cardPanels) { @@ -183,7 +186,7 @@ public class VZoneDisplay extends VCardDisplayArea { } } - return new ScrollBounds(visibleWidth, cardHeight + (rowCount - 1) * dy); + return new ScrollBounds(visibleWidth, scrollHeight); } @Override