Android 如何在react native中更改视图中的文本颜色?
我有一个观点,我试图改变文本的颜色,但我不能这样做。在免责声明视图中,我尝试将样式添加为道具,并尝试更改颜色属性,但不起作用。我已经做了以下工作:Android 如何在react native中更改视图中的文本颜色?,android,ios,react-native,Android,Ios,React Native,我有一个观点,我试图改变文本的颜色,但我不能这样做。在免责声明视图中,我尝试将样式添加为道具,并尝试更改颜色属性,但不起作用。我已经做了以下工作: <View style={styles.webview} text={ disclaimerText?.replace('\n', '<br />'), style= {{color: palette.foreground.main}}}
<View
style={styles.webview}
text={
disclaimerText?.replace('\n', '<br />'),
style= {{color: palette.foreground.main}}}
onScroll={handleScroll}
/>
如果要使用颜色,必须像这样使用
文本
组件
<View style={styles.webview} onScroll={handleScroll}>
<Text text={
disclaimerText?.replace('\n', '<br />'),
style= {{color: palette.foreground.main}}} >Some text</Text>
</View>
一些文本