Fixed footer in react native with FlatList

avriis picture avriis · Mar 11, 2018 · Viewed 13.5k times · Source

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?

Answer

avriis picture avriis · Mar 14, 2018

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>