在ReactNative中更改<TextInput />的textColor

use*_*840 6 android reactjs react-native

我希望在android react native应用程序中更改文本Color&placeholder textcolor:

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

},
Run Code Online (Sandbox Code Playgroud)

(参考:https://facebook.github.io/react-native/docs/textinput.html#content)

placeholderTextColor并按backgroundColor预期更改,但不是输入文本颜色.我使用了错误的属性,还是这是一个本机/机器人的反应错误?

Alm*_*uro 4

我可以确认它适用于 iOS,但不适用于 Android(至少对于 React Native 0.14.2)。

这个问题是几天前提交的(参见https://github.com/facebook/react-native/issues/3742)。
它应该被修复,但仅限于最新的预发布版本(v0.15.0-rc)。