Repository navigation
fix(keyboard): resolve Android 16 edge-to-edge layout expansion and navigation insets - #760
Closed
prince-0408 wants to merge 3 commits into
Closed
prince-0408 wants to merge 3 commits into
prince-0408 wants to merge 3 commits into
Conversation
Member
|
Hey @prince-0408 👋 As the issues in #758 are from me not having the latest Android Studio, I think we're good to close this one and move on to other priorities. Thanks for opening the PR! |
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.
Contributor checklist
./gradlew lintKotlin detekt testcommand as directed in the testing section of the contributing guideDescription
This PR fixes two layout and window decor issues on Android 16 (API 36, tested on Pixel 9) where edge-to-edge windowing is enforced:
Massive grey screen overlay:
empty_state_banner_containerininput_method_view.xmlwas set toandroid:layout_width="0dp"inside a verticalLinearLayout(top_container). On clean installs or before language data is cached, the empty state text wrapped character-by-character vertically, expandingtop_containerto ~1,500px and blowing up the entire keyboard window frame to >2,200px.targetWindow.decorViewcaused the entire oversized IME window to paint solid grey over the host application.empty_state_banner_containerwidth from0dptomatch_parentand stripped obsoleteConstraintLayoutattributes. KeptdecorViewandrootbackgrounds transparent, applying the theme background directly tokeyboardCard.Keyboard bottom row flush against gesture bar:
?123, spacebar,., enter) sat directly on top of the system navigation bar (∨, gesture bar, and🌐).extraBottomPadding) tokeyboardCard.setPadding()in docked mode so the keys have comfortable breathing room while the card's background color fills behind the navigation bar seamlessly.Key Files Changed
input_method_view.xml: Fixedempty_state_banner_containerwidth tomatch_parent.KeyboardThemeManager.kt: EnsureddecorViewandrootare transparent; applied theme background and navigation bar padding + 16dp bottom cushion tokeyboardCard.GeneralKeyboardIME.kt: TargetedkeyboardCardfor dockedonComputeInsets()location calculations.CHANGELOG.md: Added bug fix entry referencing [Bug]: Keyboard decor obscures screen and layout expands on Android 16 (API 36) #759.Testing
./gradlew lintKotlin: Passed with 0 errors../gradlew detekt: Passed with 0 errors../gradlew testKeyboardsDebugUnitTest: 35 tasks passed / up to date.Related issue