You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The element in Android is not responding to the same style declarations as in iOS. In my case, I cannot seem to find a way to center the text inside of the button in Android.
@iagomr or @mhollweck Can you give a specific example... do some styles work, others don't? I am putting react-native-button in a cross-platform project too, so I'll debug a little bit.
Same issue for me but I managed to center the text by setting justifyContent to center as @mhollweck suggested :). However the fontFamily doesn't seems working on Android neither. I used a TypoGraphica font on the button and it worked on iOS but not on Android. I am pretty sure I used the fonts correctly on Android as the fontFamily worked in other places in my app on Android. This is how I used it:
Activity
mhollweck commentedon Feb 11, 2016
+1 experienced the same.
I wrapped a few around the button to set the paddings and then used
justifyContenton the button.andrewljohnson commentedon Mar 3, 2016
@iagomr or @mhollweck Can you give a specific example... do some styles work, others don't? I am putting react-native-button in a cross-platform project too, so I'll debug a little bit.
jatazoulja commentedon Jul 26, 2016
Vertical Alignment of the button is at the top, not aligning in the middle...
xyz1hang commentedon Oct 17, 2016
Same issue for me but I managed to center the text by setting
justifyContenttocenteras @mhollweck suggested :). However the fontFamily doesn't seems working on Android neither. I used a TypoGraphica font on the button and it worked on iOS but not on Android. I am pretty sure I used the fonts correctly on Android as the fontFamily worked in other places in my app on Android. This is how I used it:I will be really appreciated If you could have a look.
Thanks
t2 commentedon Jan 30, 2017
@Phoenix1708 I found a solution to the Android custom fonts issue. Try adding
fontWeight: 'normal'to yourstyledeclaration.jacks205 commentedon Feb 13, 2017
Adding
fontWeight: 'normal'worked for the same issue on iOS also. Thanks.