最佳答案
我正在创建一个 Android 应用程序使用反应原生在其中有一个表单。占位符甚至不会出现在 textInput 字段中,所以我想改变占位符的颜色,但我不知道如何做。医生提到了一些我不明白的东西。
密码是这样的:
<TextInput
secureTextEntry={secureTextEntry}
style={inputStyle}
placeholder={placeholder}
value={value}
onChangeText={onChangeText}
/>
inputStyle: {
color: '#000',
paddingRight: 5,
paddingLeft: 5,
fontSize: 18,
lineHeight: 23,
flex: 2,
}
我也试过:
<TextInput
placeholderTextColor="blue"
style={inputStyle}
placeholder={placeholder}
value={value}
onChangeText={onChangeText}
/>
还有
inputStyle: {
color: '#000',
paddingRight: 5,
paddingLeft: 5,
fontSize: 18,
lineHeight: 23,
flex: 2,
placeholderTextColor: '#333'
}