【问题标题】:how to style react native expo picker in android如何在 android 中设置 react native expo 选择器的样式
【发布时间】: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


【解决方案1】:

您拥有 atm 的唯一选择是使用道具更改下拉图标的颜色(最新版本支持)

  dropdownIconColor={}

【讨论】:

    猜你喜欢
    • 2016-12-19
    • 1970-01-01
    • 2017-02-27
    • 1970-01-01
    • 1970-01-01
    • 2021-06-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多