【发布时间】:2019-04-30 15:10:29
【问题描述】:
我正在尝试将文本放入有限的空间(黄色容器)。 Android中this problem如何解决?
在 iOS the problem is solved 中使用 adjustsFontSizeToFit={true}。
我的代码:
<View
style={{
backgroundColor: 'yellow',
flex: 0.8,
marginRight: 10,
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center'
}}
>
<CustomText style={{ fontWeight: '400' }}>{`Qt. ${orderProduct.quantity}`}</CustomText>
<PriceText
style={{
fontWeight: '600',
fontSize: 18,
color: '#000'
}}
price={price}
/>
</View>
【问题讨论】:
标签: javascript android react-native