【发布时间】:2020-12-27 19:02:19
【问题描述】:
如何在 android 中设置 react native expo picker 的样式,例如更改字体大小和居中文本以及更改文本输入的背景
<Picker
selectedValue={branch}
mode="dropdown"
style={{
// fontSize: 24,
// borderRadius: 14,
backgroundColor: '#BEDCEF',
height: 40,
// alignItems: 'center',
// justifyContent:'center',
// alignContent:'center',
// shadowColor:'black',
// shadowOffset:{width:0,height:2},
// shadowRadius:6,
// shadowOpacity:0.26,
width:350,
elevation:10,
// marginBottom:290
}}
itemStyle ={{
fontSize: 24,
alignItems: 'center',
justifyContent:'center',
color:'red',
backgroundColor:'purple'
}}
onValueChange={(itemValue, itemIndex) => setBranch(itemValue)}
>
【问题讨论】:
标签: react-native