【发布时间】:2016-12-19 16:13:37
【问题描述】:
我无法设置它的样式。几乎没有这方面的任何文档。我想知道如何设置fontFamily。如何在 Picker.items 上设置背景颜色?
https://facebook.github.io/react-native/docs/picker.html
设置 fontFamily 或背景颜色不起作用。将其包装在 View 中并将样式属性赋予 View 也不起作用。
<Picker
style={styles.picker} // cannot set fontFamily here
selectedValue={this.state.selected2}
onValueChange={this.onValueChange.bind(this, 'selected2')}
mode="dropdown">
<Item label="hello" value="key0" /> // cannot set backgroundColor here
<Item label="world" value="key1" />
</Picker>
【问题讨论】:
标签: android react-native