Android: left inset ignores the back-gesture zone
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
ae713a0772
commit
445dd06048
@@ -41,8 +41,10 @@ public class Ava2Activity extends SDLActivity {
|
||||
/**
|
||||
* SDL folds the system-gesture insets into the safe area. In landscape fullscreen the status bar
|
||||
* is hidden, but its swipe-down gesture zone still reported a 120 px top inset, which pushed the
|
||||
* top HUD row down. Keep SDL's left/right/bottom; take the top only from what really covers the
|
||||
* screen there (display cutout and visible system bars).
|
||||
* top HUD row down. The left inset is the same story: Android measures the back-gesture zone
|
||||
* (90 px) from the cutout edge, so it reported 120 + 90 px and the left HUD column sat far from
|
||||
* the edge. Taps in the gesture zone still reach the app, so take top and left only from what
|
||||
* really covers the screen (display cutout and visible system bars); keep SDL's right/bottom.
|
||||
*/
|
||||
static class Ava2Surface extends SDLSurface {
|
||||
Ava2Surface(Context context) {
|
||||
@@ -60,7 +62,7 @@ public class Ava2Activity extends SDLActivity {
|
||||
WindowInsets.Type.displayCutout());
|
||||
Insets covering = insets.getInsets(WindowInsets.Type.systemBars() |
|
||||
WindowInsets.Type.displayCutout());
|
||||
SDLActivity.onNativeInsetsChanged(combined.left, combined.right, covering.top, combined.bottom);
|
||||
SDLActivity.onNativeInsetsChanged(covering.left, combined.right, covering.top, combined.bottom);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@@ -1625,3 +1625,14 @@ Outstanding:
|
||||
- the system-edge strip and joystick re-acquire are covered by unit tests only, not yet
|
||||
exercised by hand on the phone;
|
||||
- hold-to-repeat on quick slots (d2r's held potion) is not done.
|
||||
|
||||
### 2026-10-13 Mobile HUD: left column closer to the edge
|
||||
|
||||
- The left safe inset was 117 logical px on the OnePlus PJZ110 (landscape). Android adds the
|
||||
back-gesture zone (90 physical px) on top of the punch-hole cutout (120 physical px), so the
|
||||
portrait and the left button column sat about 130 logical px in from the edge.
|
||||
- `Ava2Surface.onApplyWindowInsets` now passes `covering.left` (cutout and visible system
|
||||
bars only) as the left inset, the same way it already handled the top. Taps in the gesture
|
||||
zone still reach the app. Right and bottom still use the combined insets.
|
||||
- Verified on the device: the portrait, the Quest/Emote column and the joystick moved about
|
||||
50 logical px to the left and stay clear of the cutout.
|
||||
|
||||
Reference in New Issue
Block a user