Repository navigation
Fix Android Sheet system bar visibility inheritance - #69
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
git diff --checkpasses.