问题
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>
)
}
回答1:
It is now advised to use KeyboardAvoidingView instead. It is provided by React Native API. ;)
来源:https://stackoverflow.com/questions/42159729/react-native-keyboardawarescrollview-doesnt-work