固定页脚与 FlatList 反应原生 [英] Fixed footer in react native with FlatList
本文介绍了固定页脚与 FlatList 反应原生的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在带有 ScrollView 的固定页脚上这个问题之后,我正在尝试实现使用 FlatList 在屏幕上固定页脚.我试图使用通过将平面列表放在视图中提供的答案,但是没有任何项目被渲染.有谁知道如何实现固定页脚,以扁平列表作为组件的另一个主要元素?
Following this question on fixed footer with a ScrollView, I'm trying to implement a fixed footer on the screen with a FlatList. I have tried to use the answer provided by putting the flat list inside a view, but then none of the items are rendered. Does any one know how to implement a fixed footer with a flat list as the other main element of component?
推荐答案
使用这个 flex 解决方案 我设法用几个嵌套的视图来做到这一点:
Using this flex solution I managed to do it with a couple of nested Views:
<View style={{flex: 1}}>
<View style={{flex: 0.9}}>
<FlatList/>
</View>
<View style={{flex: 0.1}}/>
</View>
这篇关于固定页脚与 FlatList 反应原生的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文