-
I have setup a view with a few inputs and some buttons. The view fits on the screen without the need for scrolling. Also, the some inputs are rendered above the top of the keyboard, others are not. Desired behavior is that the keyboard opens without the view scrolling up (or to have minimal scroll up depending on which input is focused) - and while the keyboard is shown the user should be able to scroll the full view behind the keyboard (eg. to find and focus another input or to tap a button). To allow the view to scroll behind the keyboard I have wrapped the inputs and buttons in a ScrollView and then wrapped the ScrollView in the AvoidSoftInputView. On iOS everything works great. The view adjusts up just enough on keyboard presentation and the view is nicely scrollable behind the keyboard. On Android the keyboard presents in input focus and then, after about a 1 sec delay the view scrolls up all the way so that the bottom of the view is at the top of the keyboard. The view is scrollable by the user (as with iOS) but the initial scroll position and the delay are not good/usable. This all happens when I have Android set to adjustResize and mimic ios true. When I set adjustNothing then I get no view scroll up and no ability for user scrolling while the keyboard is presented. This seems like a common use case. How can I solve this use case? EDIT - I'll add that using setAvoidOffset() with a negative value does lower the position of the view but it clips the bottom of the view (it clips out my form buttons). Thanks in advance for your help! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
I'll answer my own question :-) I found that I had an errant |
Beta Was this translation helpful? Give feedback.
I'll answer my own question :-)
I found that I had an errant
flex: 1
on by bottom button container - that prevents the view from scrolling all. For anyone finding this - make sure the view scrolls properly without regard to this library first!