fix(android): keep composer synchronized with IME - #201
Open
duoyi88 wants to merge 2 commits into
Open
Conversation
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.
Closes #194
Root cause
On edge-to-edge Android,
adjustResizeno longer moves the composer above the IME. TheKeyboardAvoidingViewchange proposed in #182 improves the layout, but a physical Pixel 11 Pro test still left the input partially covered.A larger
keyboardVerticalOffsetcan correct the open position, but React Native 0.81.5 handles AndroidkeyboardDidHideas another frame-change event. With a non-zero offset, that leaves stale bottom padding after the IME closes, so the composer does not return to the bottom.Change
KeyboardAvoidingViewpadding behavior and 90 dp offset.Keyboard.metrics(), subscribe tokeyboardDidShow/keyboardDidHide, and apply the IME-reported height directly as bottom padding.Physical-device verification
Pixel 11 Pro, Android 17:
Verification
npm test— 339 passednpm run typecheckThe change is limited to the session keyboard integration and its small pure helper/tests.