-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Cannot Center Button with NativeBase #1394
Comments
@zmerchant17 |
Closing this |
I am having issue centering button, If I have and it wraps and , all the components just stay the same, aligned to the left. If I remove the element then it sometimes works. I find I am fighting NativeBase to get basic flex functionality working. The EasyGrid also is not working as expected. I have ejected the theme so not sure if that could be causing any issues, I havny done any changes though. I simply ejected theme and chose common. I am not sure how to set to flex-end, flex-start etc.. |
@EmirGluhbegovic Share your code for centering the Button with NativeBase along with output screenshot |
@SupriyaKalghatgi thank you so much it worked. |
Any idea why the following doesn't center both the buttons?
Another try... What am I missing here?
|
@rahamin1 go through solutions provided abobe |
@SupriyaKalghatgi Tried before writing my comment. Failed. |
Posted also in https://stackoverflow.com/questions/52207028/cannot-center-buttons-horizontally-with-nativebase |
Thanks, I will try it. |
alignSelf: 'center' solved it for me! :) |
Is there a way we can center it depending on the parent component? I don't think manually centering using alignSelf is a good solution. It works just fine with React Native's Button component. |
The issues mostly stem from Native Base's |
Hi, I am trying to center a button on the screen, but cannot do so. Here is my code:
<Container> <Content> <Card> <CardItem> <Body> <Button>Text</Button> </Body> <CardItem> </Card> <Content> </Container>
I have tried using justify content, alignItems and a bunch of other things, but am not able to center the button with "Text". Any help? currently, it is just on the left of the screen. I am using android.
The text was updated successfully, but these errors were encountered: