这是我的输入风格:
searchBarInput: {
flex: 1,
fontSize: 20,
fontWeight: 'bold',
color: 'white',
height: 50,
padding: 0,
backgroundColor: 'transparent',
borderColor: '#000000',
borderWidth: 50,
borderStyle: 'solid',
}
如果我改变边框宽度,输入的大小也会改变,但仍然没有可见的边框。
我在 Android 设备上使用 react-native 0.15.0。
最佳答案
这是否回答了您的问题: https://github.com/facebook/react-native/blob/master/docs/KnownIssues.md#text-input-border
这似乎是 react-native 的一个已知错误...
您可以尝试将其包装在 View 组件中,并在 View 组件上设置您想要的边框。
关于android - react native TextInput 边框不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/33984088/