如何让 fontSize 响应原生 android 选择器? [英] How to give fontSize to react native android picker?

查看:40
本文介绍了如何让 fontSize 响应原生 android 选择器?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何将 fontSize 提供给选择器 (android)?我试图给,但它不起作用

How can I give fontSize to picker (android)? I tried to give but it's not working

<Picker
  style={{fontSize:20}}
  selectedValue={this.state.language}
  onValueChange={(lang) => this.setState({language: lang})}>
  <Picker.Item label="Java" value="java" />
  <Picker.Item label="JavaScript" value="js" />
</Picker>

推荐答案

目前,您不能.这是官方文档所说的这里

At the moment, you can't. This is what the official documentation says here

itemStyle itemStylePropType

itemStyle itemStylePropType

应用于每个项目标签的样式.

Style to apply to each of the item labels.

但这仅适用于 iOS

在 Android 上,您必须等待他们实施它(或者可能为他们编写 PR :))

On Android, you'll have to wait for them to implement it (or maybe write a PR for them :))

这篇关于如何让 fontSize 响应原生 android 选择器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆