Bha*_*ani 7 text hyperlink reactjs react-native
我想在某些文本中显示链接并显示输出,如下所示。
所以我按照代码完成了。
<View style={{flexDirection: 'row', flexWrap: 'wrap'}}>
<Text>This is non clockable text </Text>
<TouchableOpacity><Text style={{fontWeight:'bold'}}>this is clickable text link for fire onPress</Text></TouchableOpacity>
<Text> again</Text>
<Text> non clickable text</Text>
</View>
Run Code Online (Sandbox Code Playgroud)
但它显示如下输出。
然后在我使用以下代码后,它满足我的输出要求,但单击突出显示效果未设置。
<Text>
<Text>This is non clockable text </Text>
<Text style={{fontWeight:'bold'}} onPress={()=>{alert('alert')}}>this is clickable text link for fire onPress</Text>
<Text> again</Text>
<Text> non clickable text</Text>
</Text>
Run Code Online (Sandbox Code Playgroud)
如何通过触摸高亮效果获得我想要的输出?
对我来说它正在工作
<Text style={{ marginVertical: 20, }}>Your personal data will be used to process your order, support your experience
throughout this app and other purposes describe in
<Text style={{ color: 'blue' }}
onPress={() => { /*your on press event here */ }}
> privacy policy</Text>
</Text>
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
8093 次 |
| 最近记录: |