entria / react-native-fontawesome

React Native Font Awesome Icons
MIT License
176 stars 34 forks source link

Not working on Android #56

Closed avcial closed 5 years ago

avcial commented 5 years ago

Try this now,

image

image

import React, { Component } from 'react';
import { Platform, StyleSheet, Text, View } from 'react-native';
import FontAwesome, { Icons } from 'react-native-fontawesome';

const instructions = Platform.select({
  ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
  android:
    'Double tap R on your keyboard to reload,\n' +
    'Shake or press menu button for dev menu',
});

type Props = {};
export default class App extends Component<Props> {
  render() {
    return (
      <View style={styles.container}>
        <Text style={styles.welcome}>Welcome to React Native!</Text>
        <Text style={styles.instructions}>To get started, edit App.js</Text>
        <Text style={styles.instructions}>{instructions}</Text>
        <Text style={{ margin: 10, fontSize: 15, textAlign: 'left' }}>
          <FontAwesome>{Icons.chevronLeft}</FontAwesome>
          Text
      </Text>

      </View>
    );
  }
}

so you will see the most amazing icon, crossed box,

image

isn't it beautiful

so what is this? what we made wrong? or you know, What is wrong with YOUR CODE?

leandrosimoes commented 5 years ago

I really can't believe that a person who has two, maybe three contributions on GitHub can be such a d..., talking ironically like that? Really, what's the problem with these people?! Fist of all, you didn't follow the instructions because if you had followed it you would see that you have to use the IconTypes enum together with the FontAwesome component like this:

<FontAwesome type={IconTypes.FAR}>{Icons.chevronLeft}</FontAwesome>

Another info to you, best programmer ever, is that there is already a PR open to fix the font files name used in the IconTypes, so if you are so bad a... , why you didn't see that before start to saying sh...? And when you said YOUR CODE, you're wrong about it, AGAIN!. This is a public repository, so this code belongs to the community, so why you don't fix it and open a new PR instead just complain about it, huh? You piece of s...

avcial commented 5 years ago

You didn't even find the problem not even tolking about solution. But i will f.. ( fix) your code. Don't worry

leandrosimoes commented 5 years ago

Oh yeah! But first you have to learn how to follow some instructions, otherwise open a PR will not that easy for you! haha

leandrosimoes commented 5 years ago

I was curious about your experience, and I got a look at your GitHub profile and guess what?! All your GitHub are issues that you open and somebody close because you don't know how to follow instructions. How funny is that? hahahaha

leandrosimoes commented 5 years ago

Closing because is not a code problem. The problem is just because the user don't know how to setup the project, even following the README instructions.

mslabenyak commented 5 years ago

You need to rename font files names, changing '-' with '_', ex. fa-regular-400.ttf -> fa_regular_400.ttf. And relink.

jan-happy commented 5 years ago

@mslabenyak Thank you! That fixed the Android version for me!