invertase / react-native-material-design

React Native UI Components for Material Design
http://react-native-material-design.github.io
MIT License
3.15k stars 366 forks source link

Unrecognized font family 'Material Icons' #153

Closed pouu69 closed 7 years ago

pouu69 commented 7 years ago
import React, { Component} from 'react';
import { ScrollView, View, Image } from 'react-native';
import {
    Avatar,
    Subheader,
    Button,
    Checkbox,
    COLOR } from 'react-native-material-design';

class App extends Component{
    render() {
        return (
            <ScrollView>
                <View style={styles.avatarContainer}>
                    <Avatar image={<Image source={{ uri: 'https://s3.amazonaws.com/uifaces/faces/twitter/ok/128.jpg' }} />} />
                    <Avatar image={<Image source={{ uri: 'https://s3.amazonaws.com/uifaces/faces/twitter/pixeliris/128.jpg' }} />} />
                    <Avatar image={<Image source={{ uri: 'https://s3.amazonaws.com/uifaces/faces/twitter/sillyleo/128.jpg' }} />} />
                    <Avatar image={<Image source={{ uri: 'https://s3.amazonaws.com/uifaces/faces/twitter/iannnnn/128.jpg' }} />} />
                </View>
                <View>
                    <Button text='btn1' value="NORMAL FLAT" onPress={() => console.log('dd')} />
                    <Button text='btn2' value="NORMAL RAISED" raised={true} onPress={() => console.log('dd')} />
                </View>
                <View>
                    <View>
                        <Button text='Button A' raised={true} />
                    </View>
                    <View>
                        <Button text='Button B' raised={true} />
                    </View>
                </View>
                <View>
                    <Checkbox value="accepted" label="I agree to the terms and conditions" />
                </View>

            </ScrollView>
        );
    }
}

const styles = {
    avatarContainer: {
        flexDirection: 'row',
        alignItems: 'center',
        justifyContent: 'space-between',
        paddingHorizontal: 16
    }
};

export default App;
  "dependencies": {
    "react": "16.0.0-alpha.6",
    "react-native": "0.43.4",
    "react-native-material-design": "^0.3.7"
  },

An error occurred after adding the checkbox. Unrecognized font family 'Material Icons'

why?

Ehesp commented 7 years ago

You need to install react-native-vector-icons, described in the README I believe!

pouu69 commented 7 years ago

okay thx work very well