My buttons sit under the camera notch or the swipe bar on some phones
The game looks perfect on the phone you tested and then a pause button is half hidden on another, or cut off the moment the phone is turned sideways. This entry works out the usable part of the screen, including phones with no notch at all, and puts things inside it.
Why this works
The phone knows how much of each edge is covered. Taking the larger of that and a small comfort margin gives one rule that works on every device and every turn of the screen.
When not to use it
Skip it for games that run in a frame the system already insets, or whose edges hold only background; then only the important buttons need care.
In the full entry
- What to build, step by step
- Starting values and the reason for each
- 3 common mistakes and the fix
- A diagram of every state
- 42 lines of example code with 4 checks that pass
- How your AI shows you that it works
Say this to your AI
Use the Spielerando entry "My buttons sit under the camera notch or the swipe bar on some phones" (read_entry buttons-hidden-under-notch-and-home-bar) in my game. Build it step by step, and show me how you checked that it works.Or skip this and connect the MCP: your AI then finds all of this by itself.Connect the MCP