#react-native #native-base
#react-native #native-base
Вопрос:
введите описание изображения здесь] [2] [![Я сталкиваюсь с проблемой здесь, внутри карты, могу видеть часть описания, которую я пытаюсь реализовать под изображением, на самом деле оно должно быть рядом с изображением `
<ListItem>
<Card
style={{
marginTop: 0,
marginBottom: 0,
marginRight: 0,
marginLeft: 0,
borderTopLeftRadius: 8,
borderTopRightRadius: 8,
flexDirection: 'row',
}}>
<View style={{flex: 1}}>
<CardItem>
<Thumbnail
source={require('../../assets/images/restaurant_128.png')}
/>
</CardItem>
</View>
<View style={{flex: 3, flexDirection: 'column'}}>
<CardItem>
<Body>
<Text>{item.Title}</Text>
<Text style={{backgroundColor: 'green'}}>
{item.Description}
</Text>
</Body>
</CardItem>
</View
</Card>
</ListItem>
`
Ответ №1:
попробуйте это:-
<View style={{
flexDirection: "row",
justifyContent: "flex-start",
alignItems: "center",
backgroundColor: "#B8B2B2",
width: "100%",
height: 100
}}>
<View style={{
width: "30%",
backgroundColor: "red",
height: 100
}}>
<Text>left image here</Text>
</View>
<View style={{
width: "70%",
backgroundColor: "#B8B2B2",
height: 100
}}>
<View style={{
flexDirection: "row",
justifyContent: "space-between",
alignItems: "center",
backgroundColor: "#fff",
height: 50
}}>
<View style={{
width: "30%",
backgroundColor: "teal",
height: 50
}}>
<Text>lamb samosa</Text>
</View>
<View style={{
width: "30%",
backgroundColor: "teal",
height: 50
}}>
<Text>$4.5</Text>
</View>
</View>
<View style={{
width: "100%",
backgroundColor: "#B8B2B2",
height: 50
}}>
<Text>Lorem Ipsum</Text>
</View>
</View>
</View>