How to disable Keyboard appearance animation in React Native

本小妞迷上赌 提交于 2019-12-23 09:56:45

问题


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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!