<KeyboardAvoidingView style={{ flex: 1 }}>
<FlatList
// This keeps the keyboard up and disables the user's ability to hide it.
keyboardShouldPersistTaps="handled"
data={this.state.examples}
keyExtractor={(item, index) => index.toString()}
renderItem={this._renderItem}
contentContainerStyle={{ flex: 1}}
/>
</KeyboardAvoidingView>
到目前为止,我已经达到了我想要的效果。然而,当键盘弹起时 - 它会隐藏FlatList渲染的底部部分项目。用户无法向上滚动并查看最后的项目,因为它们留在键盘后面。 如何保持键盘打开(并禁用被解除的能力),同时能够查看和滚动整个FlatList内容?