Skip to content

Fix Android Sheet system bar visibility inheritance - #69

Merged
Moriafly merged 1 commit into
mainfrom
fix/sheet-system-bars
Oct 29, 2026
Merged

Moriafly merged 1 commit into
mainfrom
fix/sheet-system-bars

Conversation

@Moriafly

Copy link
Copy Markdown
Owner

Opening a Sheet from a host with a hidden status bar reveals it because the Android dialog has its own system bar visibility requests. Capture the host's status and navigation bar visibility before the dialog takes focus, then apply that snapshot once to each new Sheet window.

Sheet content can subsequently manage its own bars without recomposition overriding those changes. Closing the Sheet leaves the host's requests untouched. The change is internal to Android and adds no public API. Inheritance uses the host's resolved opening insets; later host changes are not automatically synchronized.

Validation:

  • Debug sample and Android test APKs build successfully.
  • Four real-window instrumentation tests pass on Android 12 (API 31): the core regression covers bottom and floating Sheets, content-controlled visibility, recomposition, closing and reopening; existing regressions cover icon appearance and IME/back handling.
  • git diff --check passes.

Capture the owner's status and navigation bar visibility before the Sheet dialog takes focus, then initialize each new dialog window from that snapshot. This prevents opening a Sheet from revealing bars hidden by the host.

Apply the snapshot only once so subsequent visibility changes made by Sheet content survive recomposition. Leave the owner's requests untouched on dismissal and keep the implementation internal without adding public API.

Validation: assembled the debug sample and Android test APKs. Four real-window instrumentation tests passed on Android 12 (API 31), covering bottom and floating Sheets, content-controlled bar visibility, recomposition, dismissal, reopening, icon appearance, and IME/back handling. git diff --check passed.
@Moriafly
Moriafly merged commit 4540aaf into main Oct 29, 2026
3 checks passed
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