Closed paulobordignon closed 3 years ago
On React Native (0.64) Android using expo (42.0.0):
` <KeyboardAvoidingView style={styles.background} behavior={Platform.OS === 'ios' ? 'padding' : 'height'}>
<View style={styles.container}> <Picker selectedValue="selecione" onValueChange={(itemValue, itemIndex) => setCategoryId(itemValue)}> <Picker.Item label="Java" value="java" /> <Picker.Item label="JavaScript" value="js" /> </Picker> </View>
`
background: { flex: 1, backgroundColor: colors.textLight, }, container: { flex: 1, alignItems: 'center', marginTop: getStatusBarHeight() + 150, paddingTop: 50, backgroundColor: colors.background, borderRadius: 25, },
Because alignItems: 'center' in container style, the picker hasn't working.
You have to change Picker width, because now is to big to render on screen.
Thanks @LuxikHS
style={{width: '90%'}}
It's the solution for my problem.
On React Native (0.64) Android using expo (42.0.0):
` <KeyboardAvoidingView style={styles.background} behavior={Platform.OS === 'ios' ? 'padding' : 'height'}>
`
background: { flex: 1, backgroundColor: colors.textLight, }, container: { flex: 1, alignItems: 'center', marginTop: getStatusBarHeight() + 150, paddingTop: 50, backgroundColor: colors.background, borderRadius: 25, },
Because alignItems: 'center' in container style, the picker hasn't working.