【发布时间】:2019-04-17 00:50:27
【问题描述】:
下面是我的代码,它在视图中显示图像和文本,当我设置图像样式时,文本会被截断
</ScrollView>
<View style={{ flex: 1 }}>
<Image
source={require("../../assets/bannerImages/1.jpg")}
resizeMode={"center"}
style={{ height: "30%", width: "100%" }}
/>
<Text style={{ flex: 1 }}>
1Aawaz is a one step solution for all. Not only popular instruments
2like Guitar, Keyboard, Drums but also we provide training for rare
3Aawaz is a one step solution for all. Not only popular instruments
4like Guitar, Keyboard, Drums but also we provide training for rare
5Aawaz is a one step solution for all. Not only popular instruments
like Guitar, Keyboard, Drums but also we provide training for rare
Aawaz is a one step solution for all. Not only popular instruments
like Guitar, Keyboard, Drums but also we provide training for rare
like Guitar, Keyboard, Drums but also we provide training for rare
Aawaz is a one step solution for all. Not only popular instruments
like Guitar, Keyboard, Drums but also we pr like Guitar, Keyboard,
9Drums but also we provide training for rare Aawaz is a one step
10solution for all. Not only popular instruments like Guitar,
Keyboard, 13Drums but also we pr Ads
</Text>
</View>
</ScrollView>
我想要的是在图像下方显示文本,并且能够为图像提供宽度和高度。在设置图像样式之前,一切正常,文本不会被剪裁。
【问题讨论】:
-
可以提供截图吗?
-
对不起,但看起来图像已调整到给定的宽度和高度,但文本被剪掉了。这只发生在我为图像指定高度和宽度时。
-
你有
</ScrollView>开头(注:/) -
stackoverflow.com/questions/36284453/…。你想要这样的东西吗?
标签: javascript reactjs react-native