嗨,我想在文本中包装TouchableOpacity,因为我想让一些文本可以点击.当我把所有东西都包装在一个文本中时,它看起来很完美,这就是我想要它的样子.
<Text
style={{color: colors.black,
fontSize: 12,
fontWeight: 'normal',
marginTop: 10,
lineHeight: 18}}>
{strings.loginPrivacyTermsCondOne}
<Text style={{color: colors.primaryColor,
fontSize: 12,
fontWeight: 'normal',}}>
{strings.loginPrivacyTermsCondTwo}
</Text>
{strings.loginPrivacyTermsCondThree}
<Text style={{color: colors.primaryColor,
fontSize: 12,
fontWeight: 'normal'}}>
{strings.loginPrivacyTermsCondFour}
</Text>
{/* <TouchableOpacity onPress={ this.termsOfService }>
<Text style={{color: colors.primaryColor,
fontSize: 12,
fontWeight: 'normal',}}>
{strings.loginPrivacyTermsCondFour}
</Text>
</TouchableOpacity> */}
</Text>
当我添加TouchableOpacity时,它不起作用.
我试着把它添加到一个视图中,然后效果很好,我可以添加TouchableOpacity,但从UI的Angular 来看,它们没有正确对齐.
这是一个屏幕截图,显示了TouchableOpacity不起作用的文本,第二位在视图中,TouchableOpacity起作用,但看起来不正确.
如何才能让它看起来像第一位.非常感谢您的建议.
谢谢