Repository navigation
fix(layout): paint IME navigation bar frame and reserve its real height - #811
Merged
Merged
Conversation
On Android 15+ the IME draws its own NavigationBarFrame below the input view. It has no background, and window.navigationBarColor does not reach it, so the app behind showed through the nav strip. Paint it with the navigation bar color. The frame can also be taller than the system navigation bar inset, so the keyboard's bottom rows ended up under it. Reserve the measured frame height instead of the inset, and update the padding when the frame is laid out.
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.
Summary of Changes
On Android 15+ the IME draws its own
NavigationBarFrame(chevron, IME switcher, gesture handle) below the input view. This PR paints that frame and reserves its real height.Motivation & Context
When the keyboard opened, the navigation bar strip under it was transparent and the app behind showed through. After painting it, the bottom rows could still sit under the nav row, or leave a gap, depending on the focused app.
Root cause, measured with
cmd window dump-visible-window-viewson a POCO M2 Pro (gesture navigation, display 1080x2400):NavigationBarFrameis 126px tall and has no background.window.navigationBarColordoes not reach it with edge-to-edge enforced.Changes Made
LatinIME.setNavigationBarColor()also paints the IMENavigationBarFramewith the nav bar color (and clears it when the custom nav bar color setting is off). NewfindNavigationBarFrame()helper.InputView.updateBottomPadding()reserves the measured frame height instead of the system inset, and re-runs when the frame is laid out. Falls back to the old inset logic when no frame exists.Verification & Testing
./gradlew :app:assembleStandardDebugNot tested: floating mode, 3-button navigation, custom nav bar color turned off.
Guidelines Checklist