【发布时间】:2015-11-14 06:39:26
【问题描述】:
我希望在 android react native 应用中更改文本颜色和占位符文本颜色:
render: function() {
return (
<View>
<TextInput
placeholder='Add Credit'
placeholderTextColor='ffffff'
textAlign='center'
/>
</View>
);
},
var styles = StyleSheet.create({
creditInput: {
backgroundColor: "#3f51b5",
color: "#ffffff", //Expecting this to change input text color
},
(参考:https://facebook.github.io/react-native/docs/textinput.html#content)
placeholderTextColor 和 backgroundColor 会按预期更改,但输入文本颜色不会更改。我是否使用了错误的属性,或者这是一个 react-native/android 错误?
【问题讨论】:
标签: android reactjs react-native