Repository navigation
Lift snackbars above the navigation bar and keyboard - #783
Merged
Merged
Conversation
MainActivity consumes the window insets at the decor, so a snackbar parented to the content never saw the bottom bar: with 3-button navigation it sat partly behind it. SnackbarHelper now adds the root's bottom system-bar and keyboard inset to its margin; Material's gesture inset only tops up what is missing, so gesture navigation does not lift it twice. Fixes #782 Co-Authored-By: Claude Opus 5.5 <[email protected]> Claude-Session: https://claude.ai/code/session_01FW6WZZfQGJ4fuTzVR4DhYg
Merged
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.
🤖 Generated with Claude Code
Fixes #782.
MainActivity.applyWindowInsetsconsumes the insets at the decor and pads it only left, top and right, so a snackbar parented toandroid.R.id.contentnever saw the bottom bar. Material lifted it only by the mandatory gesture inset, which is 0 with 3-button navigation, so the bar covered part of it.SnackbarHelpernow adds the root's bottom system-bar and keyboard inset to the snackbar's margin. Material's own gesture inset only adds what that margin lacks, so nothing is lifted twice.Checked on a Pixel 9 Pro emulator with an
editRefusedsnackbar over a document: on main it reached the screen's bottom edge in both navigation modes, over the gesture handle too. Now it ends above the bar in both (3-button: text ends at y 2688, bar starts at 2712; gesture: 2760 and 2784).The snackbar still covers the bottom of the document's floating buttons, as it did before; they are not in a CoordinatorLayout. No changelog entry here, since
Unreleasedarrives with #781.