【发布时间】:2018-12-04 20:14:59
【问题描述】:
我试图创建一个视图,我想通过一个平面列表来显示,以便在单击它时用户可以到达顶部。但是平面列表覆盖了该元素。
<View style={{backgroundColor:'#e6e6e6',flex:1,}>
<View style={{position:'absolute'}}>
<Text>Scroll To Reload</Text>
</View>
<FlatList refreshing={this.state.refresh} onRefresh={()=>this.refreshAllTweets()}
data={tweets}
keyExtractor={(item, index) => index.toString()}
renderItem={({item}) =>
<TweetItem onPress={()=>this.goToDetail(item.id)} onImagePress={()=>this.toggleModal(item.id)}
onCommentPress={()=>this.showComments(item.id)} tweet={item}/>}
/>
</View>
【问题讨论】:
标签: react-native react-native-flatlist