Yanan Wang
Yanan Wang

Reputation: 121

Android react-native scrollView can not scroll to the top when keyboard show

Android react-native scrollView contain multiple textinput, height greater than the height of the screen when the keyboard pops up , the entire page will go on top , and you can not scroll to the top

Upvotes: 1

Views: 1172

Answers (1)

stereodenis
stereodenis

Reputation: 3745

Try to use this core component

Open sourced KeyboardAvoidingView Summary: KeyboardAvoidingView is a component we built internally to solve the common problem of views that need to move out of the way of the virtual keyboard.

KeyboardAvoidingView can automatically adjust either its position or bottom padding based on the position of the keyboard.

https://github.com/facebook/react-native/commit/8b78846a9501ef9c5ce9d1e18ee104bfae76af2e

Upvotes: 2

Related Questions