Skip to content

fix(android): inset modal close button below status bar - #83

Open
jsdatarocks wants to merge 2 commits into
NativePHP:mainfrom
jsdatarocks:fix/android-modal-close-button-inset
Open

fix(android): inset modal close button below status bar#83
jsdatarocks wants to merge 2 commits into
NativePHP:mainfrom
jsdatarocks:fix/android-modal-close-button-inset

Conversation

@jsdatarocks

@jsdatarocks jsdatarocks commented Aug 30, 2026

Copy link
Copy Markdown

Description

Summary

Keeps the Android modal close button below the status bar by applying the current status bar inset to its header row before the existing 8.dp content padding.

Problem

Android modals are rendered as full-screen Compose dialogs with decorFitsSystemWindows disabled. When a modal is dismissible, its close-button row previously used only a fixed 8.dp padding and did not account for the status bar inset.

On edge-to-edge windows, this could place the close button inside the status bar area instead of within the modal's usable content area. The result varies with the device's status bar inset, so the control could appear misplaced or overlap system UI.

Captura de Tela 2026-08-30 às 10 08 46

Changes

  • Adds Compose's statusBarsPadding() to the dismissible modal header row on Android.
  • Applies the status bar inset before the existing 8.dp padding, preserving the intended spacing inside the safe content area.
  • Adds a Pest regression test that protects the close-button modifier chain and its ordering.
  • Leaves modal visibility, dismiss callbacks, back-button handling, outside-tap handling, content rendering, and theming unchanged.
  • Does not affect non-dismissible modals or the iOS renderer.
Captura de Tela 2026-08-30 às 11 26 00

Dependency and rollout

This is a self-contained Android layout fix. It introduces no new public API, configuration, or dependency requirements and can be reviewed and released independently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant