Fix/UI problems#94
Open
ad-devel wants to merge 13 commits into
Open
Conversation
Collaborator
|
Man kann die Cards noch nicht zu 100% sehen, soll ich das übernehmen, oder geht sich das bei dir noch aus? den Text sieht man theoretisch schon, es gehört nur noch bisschen kleiner, sodass man oben und unten auch die ganze Card sieht |
Collaborator
Author
|
Ja kannst du das bitte übernehmen? Wäre echt super! |
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Context
This PR improves the gameboard touch interaction and fixes layout issues on devices with different screen sizes and virtual navigation buttons.
Until now, zooming the gameboard only worked reliably when the touch points started between cards. Since the cards are placed close together, this made pinch-to-zoom difficult during normal gameplay. The gameboard also started with a default zoom level that could be too large, so not all cards were visible initially. Additionally, the app used fullscreen edge-to-edge behavior, which could cause UI elements to overlap with Android navigation buttons and accidentally minimize the app.
The goal of this PR is to make the gameboard easier to control, show the full board by default, and prevent important UI controls from being covered by system navigation.
Description
The gameboard now supports pinch-to-zoom gestures even when both fingers start on top of cards. Two-finger gestures are detected at the board level before card buttons handle touch input, so zooming through cards works without accidentally selecting cards.
The initial gameboard scale is now calculated dynamically based on the available board container size. This ensures that all cards are visible when the gameboard is opened, while still allowing players to freely zoom and pan afterwards.
Fullscreen edge-to-edge system bar handling was removed from the main activity. This prevents the UI from drawing underneath virtual Android navigation buttons, avoiding overlap with controls such as the clue send button.
Changes in the code base
MainActivityChanges outside the code base
N/A
Additional information
This PR does not change backend behavior or game rules. It only improves frontend interaction and layout behavior.
The card spacing remains unchanged. The improved zoom behavior is achieved by handling two-finger gestures at the board level instead of increasing the distance between cards.
The default board scale is only used as the initial view state. Players can still zoom in, zoom out, and move the board manually during gameplay.
Recommended verification:
testDebugUnitTestktlintCheck