0
I’m using the component Picker of React Native and ta working, listing, selecting and such, only that I can not style it well, I was able to put edge, arrange the size but the text that is inside it I could not move, neither the size of the font nor the position that it will be inside, I tried to put the properties
flexDirection: 'row', alignItems: 'center', justifyContent: 'center'
in the style of a View that stands over the Picker, in the style of Picker and on the property itemStyle of Picker and none of these worked, in all the text is left, not pasted, but is left and I wanted to center it. Someone can help me?
Code:
<View style={HorariosCommandStyles.containerPickerServicos}>
<Picker itemStyle={{ paddingLeft: 50, fontSize: 35 }} style={{ width: '90%', height: '100%' }}>
{this.state.servicos.map(s => <Picker.Item label={s.servico.nome} value={s.servico.id} key={s.id} />)}
</Picker>
</View>
How do you want it to look? Enter the full code with the services.
– sant0will
@sant0will As I say in the question I would like to center the text in the middle of the
Pickerbut in general it would be like stylizing that text ofPicker.– Bruno