React Native KeyboardAwareScrollView不起作用(React Native KeyboardAwareScrollView doesn't work)
我正在尝试使用react-native-keyboard-aware-scroll-view库(0.2.7)。 它对我来说绝对没有任何意义。 我究竟做错了什么?
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view' render() { return ( <KeyboardAwareScrollView> <View> <TextInput placeholder='hi1' /> <TextInput placeholder='hi2' /> <TextInput placeholder='hi3' /> <TextInput placeholder='hi4' /> <TextInput placeholder='hi5' /> <TextInput placeholder='hi6' /> <TextInput placeholder='hi7' /> </View> </KeyboardAwareScrollView> ) }I'm trying to use the react-native-keyboard-aware-scroll-view library (0.2.7). It does absolutely nothing for me. What am I doing wrong?
import { KeyboardAwareScrollView } from 'react-native-keyboard-aware-scroll-view' render() { return ( <KeyboardAwareScrollView> <View> <TextInput placeholder='hi1' /> <TextInput placeholder='hi2' /> <TextInput placeholder='hi3' /> <TextInput placeholder='hi4' /> <TextInput placeholder='hi5' /> <TextInput placeholder='hi6' /> <TextInput placeholder='hi7' /> </View> </KeyboardAwareScrollView> ) }最满意答案
现在建议使用KeyboardAvoidingView 。 它由React Native API提供。 ;)
It is now advised to use KeyboardAvoidingView instead. It is provided by React Native API. ;)
更多推荐
发布评论