ide / react-native-button

A button for React apps
MIT License
773 stars 129 forks source link

fontFamily not working on Android #52

Closed xyz1hang closed 8 years ago

xyz1hang commented 8 years ago

Hi, thanks for writing this library. 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:

<Button
            containerStyle={styles.my_btn}
            style={{
              fontSize: 20,
              fontFamily: 'typographica',
              color: 'black'
            }}
            onPress={this.goToNext.bind(this)}>
            Press me !
 </Button>

I will be really appreciated If you could have a look.

Thanks

Cygnus2112 commented 8 years ago

I ran into this issue as well. What was the solution?

ghost commented 7 years ago

I made it work by warpping <Text> element inside <Button>:

<Button><Text style={{ fontFamily: '...'}}>Let's play</Text></Button>