如果我在提要屏幕上放了一个文本框,则提要屏幕不会显示所有列表。 显示“ Feed屏幕”,但不显示平面列表。 我该如何解决网站上的平面列表问题?
render(){
return(
<View style={{flex: 1}}>
<Text> Feed screen </Text>
<FlatList
refreshing={this.state.refresh}
onRefresh={this.loadNew}
data={this.state.photo_feed}
keyExtractor={(item, index) => index.toString()}
style={{flex:1, backgroundColor: '#eee'}}
renderItem={({item, index}) => (
<View key = {index} style = {{width : '100%', overflow: 'hidden', marginBottom: 5, justifyContent: 'space-between', borderBottomWidth: 4, borderColor: 'hidden'}}>
<View style = {{padding : 5, width : '100%', flexDirection : 'row', justifyContent : 'space-between'}}>
<Text>{item.posted}</Text>
<TouchableOpacity
onPress = {() => this.props.navigation.navigate('DogProfile', {userId : item.authorId})}>
<Text>{item.author}</Text>
</TouchableOpacity>
</View>
<View>
<Image source = {{ uri : item.url}}
style = {{resizeMode: 'cover', width: '100%', height:275}}
/>
</View>
<View style = {{padding : 5}}>
<Text>{item.caption}</Text>
<TouchableOpacity onPress = { () => this.props.navigation.navigate('Comments',{userId: item.i})}>
<Text style={{color: 'grey',marginTop: 10, textAlign: 'center'}}>[View comments]</Text>
</TouchableOpacity>
</View>
</View>
)}
/>
)}
</View>
}