APSL/react-native-button

don't take effet when set flex

Geforceyu opened this issue · 2 comments

when i set the button's father view's style flexDirection:'column', aliginItems:'center'
this button not center ,is left

I'm having the same issue and can't figure out how to center it. Anyone else know how to center it?

You have to set the css prop "alignSelf" of the button to "center". In the code, the default is "stretch", which starts at the left edge, and then goes as far as the allowed width.