我有一个平面列表呈现如下视图
<TouchableOpacity style= {styles.AdRow} onPress={() => this.Navigatioe(item.id)}>
<View style = {styles.LeftItems}>
<Image source={{uri:item.url}} style={styles.ImagePRosa} />
</View>
<View style = {styles.RightItems}>
<Text style = {styles.TitleText}>{item.title}</Text>
<Text style = {styles.TitlePrice}>{item.price}</Text>
<Image source={require('../Svg/Location.png')} style={styles.ImagePRosing} />
<Text style = {styles.TitleCity}>{item.city}</Text>
<Text style = {styles.TitleNeib}>{item.neib}</Text>
</View>
</TouchableOpacity>
Run Code Online (Sandbox Code Playgroud)
和造型是
LeftItems:{
width:"40%",
height:"100%",
},
RightItems:{
width:"60%",
position:"relative",
height:"100%",
},
TitleText:{
position:"absolute",
top:4,
width:"100%",
height:65,
left:0,
right:0,
},
TitlePrice:{
position:"absolute",
bottom:0,
width:"40%",
height:25,
left:5,
},
TitleCity:{
position:"absolute",
bottom:23,
width:130,
height:18,
right:40,
},
TitleNeib:{
position:"absolute",
bottom:2,
width:130,
height:18,
right:40, …Run Code Online (Sandbox Code Playgroud) react-native ×1