Add Apply Window Insets Listener to Floating Action Button on Collaborators and Edit Tags Screens#1739
Merged
mzorz merged 3 commits intoAutomattic:mzorz/update-targetsdk-35from Aug 4, 2025
Conversation
theck13
commented
Aug 3, 2025
Comment on lines
+170
to
+174
| if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) { | ||
| bottom = insets.getInsets(WindowInsets.Type.systemBars()).bottom; | ||
| } else { | ||
| bottom = insets.getSystemWindowInsetBottom(); | ||
| } |
Contributor
Author
There was a problem hiding this comment.
Since WindowInsets.getSystemWindowInsetBottom() was deprecated in API 30, Build.VERSION.SDK_INT >= Build.VERSION_CODES.R condition ensures the deprecated statement won't be used in API 30 or later with WindowInsets.getInsets(WindowInsets.Type.systemBars()).bottom used instead.
12 tasks
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.
Fix
After the changes up to be33637 in #1737, the floating action button on the Collaborators and Edit Tags screens overlaps the system navigation bar. The
setOnApplyWindowInsetsListenermethod described in the official documentation to Display Content Edge-to-Edge in Views under the Handle Overlaps Using Insets section was used after lines 81/92 inCollaboratorsActivity.ktand 64/75 inTagsActivity.ktin #1737 to fix the issue. See the screenshots below for illustration.Screenshots
Collaborators
Edit Tags
Test
Follow the steps below to test the Add Collaborator and Add Tag floating action buttons on the Collaborators and Edit Tags screens respectively.
Collaborators
Edit Tags
Review
Only one developer is required to review these changes, but anyone can perform the review.
Release
These changes do not require release notes.