Reputation: 44051
With reference to the following Snack:
https://snack.expo.io/@deltanovember/shallow-scone
my Picker has an <Icon />
that aren't properly aligned:
I've tried to fix this by fixing the width of the Picker to assign this style :
style={{ width: 100 }}
but the <Icon />
still aren't aligning.
How can I get my <Icon />
to align ?
Upvotes: 1
Views: 45
Reputation: 585
you should set width style to your picker like this :
style={{ width: '100%' }}
I try it in expo and it fixed :)
about the question mark it happened when you set the icon name wrong!
you can use this website to search in Icon names :
https://oblador.github.io/react-native-vector-icons/
Extra
you can get the screen width and use it where ever u want in your project like this :
import { Dimensions } from 'react-native'
const { width: WIDTH } = Dimensions.get('window')
Upvotes: 3