question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Picker Item text Font family

See original GitHub issue

I use textStyle and itemTextStyle to change font family in Picker text item but doesn’t work. Can anyone help me?

<Picker
              mode="dropdown"
              selectedValue={this.state.selectedProvince}
              onValueChange={() => { }}
              textStyle= {{
                fontFamily: 'IRANSans'
              }}
              >
              {Object.keys(this.state.provinces).map((key) => {
                return (<Picker.Item label={this.state.provinces[key]} value={key} key={key} />)
              })}
</Picker>

and

<Picker
              mode="dropdown"
              selectedValue={this.state.selectedProvince}
              onValueChange={() => { }}
              itemTextStyle= {{
                 fontFamily: 'IRANSans'
              }}
              >
              {Object.keys(this.state.provinces).map((key) => {
                return (<Picker.Item label={this.state.provinces[key]} value={key} key={key} />)
              })}
</Picker>

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:7 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
alihesaricommented, May 31, 2018

@behzad888 Hi, Behzad I think this is a React Native problem on Android. Please read this #1885 Also you can use this https://github.com/sohobloo/react-native-modal-dropdown

1reaction
alihesaricommented, May 31, 2018

@akhil-geekyants You are testing Font-family on <Text> tag, but We have this problem in the <Picker> and <Picker.Item> for Android. 😄😃 Did you know what I mean?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fontfamily on Picker.Item not working. FontWeight ... - GitHub
I try to add fontFamily and styling to Picker. ... the Picker on my own by simply using View, Pressable, Modal, Flatlist, Text...
Read more >
Changing Picker.Item font family React native? - Stack Overflow
I want to change the font of the picker items, and i add a property itemStyle with fontFamily values. But the pickers items...
Read more >
Picker.FontFamily Property (Xamarin.Forms) - Microsoft Learn
Gets or sets the font family for the picker text.
Read more >
react native picker text style android
In React Native, we are more strict about it: you must wrap all the text nodes inside of a <Text> component. Changing Picker.Item...
Read more >
PickerView - Tuya Design
PickerView is a multiple-choice container view,Be sure to specify a width and ... import { Picker } from 'tuya-panel-kit' ... textSize, Text size...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found