[英]I tried to send text component to end of screen but it doesnt work
I have 2 text elements in a text element. 我在一个文本元素中有2个文本元素。 I tried to send second text element to the end but I couldn't do that how can I do it ?
我尝试将第二个文本元素发送到末尾,但我不能这样做,该怎么办?
<Text style={[styles.text2, item.Ccolor == 'MAVI' ? {color:'rgba(14, 110, 172, 1)'}: {color:'#f7b731'},{position:'relative'}]}
animation={isActive ? 'bounceIn' : undefined}>
<Text style={{textAlign:'left'}}> {item.Beyanname} </Text>
<Text style={{position:'absolute',right:0}}> {item.Gumruk} </Text>
</Text>
From the React Native documentation, the Text
component does not have a position
prop. 从React Native文档中,
Text
组件没有position
属性。
Try using a View
instead, but do note, you cannot use a View
within a Text
. 尝试改用
View
,但要注意,您不能在Text
使用View
。
<View style={{position:'absolute',right:0}}>
<Text>{item.Gumruk}</Text>
</View>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.