picker
picker copied to clipboard
How set "Text Styles" like textTransform, textAlign etc..? Nothing works inside styles, also itemStyles is only for Ios!!
I am trying to get the text to the center and to change all the text to uppercase I am not able to do that in any kind of style. Not style property not in itemStyle property also tried in Picker.item style property.(ON ANDROID)
Here is my snippet:
<Picker
selectedValue={language1}
onValueChange={itemValue => setlanguage1(itemValue)}
style={{
width: '100%',
textTransform: 'uppercase',
textAlign: 'center',
}}
dropdownIconColor="#E4F7FF">
<Picker.Item
label="Java"
value="java"
style={{textTransform: 'uppercase', textAlign: 'center'}}
/>
<Picker.Item label="JavaScript" value="js" />
</Picker>
None of this code is getting the text in "center" or transforming it in "uppercase".
I have the same issue and I am trying to understand what is going behind the scenes. Looks the Picker component does not take the styles to use them. It looks like it uses its own predetermined styling behind the scenes and we can not update most of the css.
Same Issue. no styles are being applied.
I'm having the same problem, I can't style anything. I wanted to style the prompt text which is too big and I couldn't either
You can style for item by using itemStyle props in Picker tag, but this only works in IOS. In Android, you just only change the color of the label. I'm trying to read the source code of the package but cannot find anything else
so I really wanted to change the size of the label and it's on android that I need!
I found a library that uses this same library but let me customize: react-native-picker-select
@osvaldokalvaitir What library did you find?
@ctwillie https://www.npmjs.com/package/react-native-picker-select
Did anyone Find any solution ? Or I have to change Libary for just styling dropdown picker item?
So it still is not possible to adjust the textAlignment?