How to handle keyboard when i have a long form


#1

Hi, I have a long form which i need the user to input information. How do i make sure the keyboard dont hide the form inputs:

Example: https://snack.expo.io/SyTCsMRo-

Things i have tried:

  1. https://facebook.github.io/react-native/docs/keyboardavoidingview.html – Works on both ios and android but breaks my flex layout.
  2. Keyboard Aware ScrollView - Works on IOS and not on android
  3. APSL/react-native-keyboard-aware-scroll-view - Works fine on IOS but no integration can be done on android as manifest xml needs to be configured.

Can you please suggest what’s the right way to do this?


#2

Hi, i think #1 would be the recommended solution. If you decide it’s better to use #3 you may need to detach to ExpoKit, but I think it’s more worth your time to just get #1 working with your layout.


#3

Hi @kaushikdas

I’m also working on this usecase. I did put my Input inside a ScrollView.
i will try to programmatically scroll to the focused input everytime a new one is focused. (maybe using its index if the height is static).

Did you find a solution by your own ?