【发布时间】:2020-08-03 04:39:06
【问题描述】:
我在flatlist 下方有一个视图。我希望视图始终位于屏幕底部,并将其包裹在 KeyboardAvoidingView 中。查看视频了解更多详情
https://drive.google.com/file/d/1eeMfpH3AV7AqLNqAhlhQX5JmOQSRLbtp/view?usp=sharing
只要我评论我的FlatList 代码,底部视图就不会闪烁。
下面是我的代码
<View>
<FlatList ..../>
<KeyboardAvoidingView
behavior={Platform.OS == "ios" ? "padding" : "height"}
>
<SafeAreaView style={styles.bottomViewStyle}>
<TouchableOpacity>
<Image source={CAMERA_CHAT_ICON} />
</TouchableOpacity>
<View style={styles.textAreaViewStyle}>
<TextInput
placeholder="Start Typing..."
placeholderTextColor="#9b9b9b"
style={styles.textInputStyle}
/>
</View>
<TouchableOpacity>
<Image source={CHAT_SEND_ICON} />
</TouchableOpacity>
</SafeAreaView>
</KeyboardAvoidingView>
</View>
【问题讨论】:
标签: react-native react-native-flatlist