Spielerando

Fix buttons that sit under the notch or the home bar on newer phones

On many phones the corners of the screen are cut, rounded or covered by a system bar, and a button placed there cannot be tapped or even seen. This entry shows how to make the AI place controls inside the usable area, also after the phone is turned on its side.

Why this works

The screen you see is not the screen you can use. The phone knows which strips are cut, rounded or covered, so let it tell you, and measure every control from the edge of the usable area instead of the edge of the glass. Turning the phone moves those strips.

When not to use it

This is not needed for a game that runs in a fixed window on a desktop, or one that already leaves wide empty bars around its picture. If the whole picture is scaled to fit inside the safe area, controls inside it are safe already.

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
  • 24 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 "Fix buttons that sit under the notch or the home bar on newer phones" (read_entry buttons-hidden-behind-phone-notch) 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