Fix: KeyboardAvoidingView Android behavior fix. #51132
Open
+5
−0
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.
Try to resolve Android compatibility for KeyboardAvoidingView component.
Summary:
On Android devices, KeyboardAvoidingView causes various space errors after opening / closing.
The main reason for this is that when I examine the values in the KeyboardAvoidingView component, in some cases the area covered by the keyboard does not equal 0.
This change resolves the following issues.
#29614 #47140 #50444 #50728
Changelog:
[ANDROID] [FIXED] - Fixed issues with KeyboardAvoidingView after keyboard on/off.
Test Plan:
1- Implement the change.
2- Try the steps of the referenced issues again.
3- Verify that everything works correctly.
Examination:
Case 1: View cannot set correct height after keyboard open/close. #29614 #47140
State1-Before.mp4
State1-After.mp4
Case 2: Orientation problem is observed after Android API >= 30. This problem is not observed when Android API < 30. #50444 #50728
State2-Before.mp4
State2-After.mp4