问题
When the user start focusing the text input. The keyboard will be moved in from the bottom. How can i avoid this animation when start focusing?
I just read the doc of TextInput, Keyboard. But no related parameter is mentioned in the doc:
https://facebook.github.io/react-native/docs/keyboard.html
https://facebook.github.io/react-native/docs/textinput.html
回答1:
Currently, It's not supported.
RN doesn't support a way to set [UIView setAnimationsEnabled:NO];
, which is the way to disable the animation for iOS, or setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_VISIBLE);
for Android.
来源:https://stackoverflow.com/questions/45581681/how-to-disable-keyboard-appearance-animation-in-react-native