This is my simple react native page:
'use strict';
import React, { Component } from 'react';
import {
AppRegistry,
StyleSheet,
ToolbarAndroid
} from 'react-native';
import Icon from 'react-native-vector-icons/Ionicons';
class myapp extends Component {
render() {
return (
<ToolbarAndroid
title="AwesomeApp"
navIconName="md-arrow-back"
actions={[
{
title: 'Settings',
iconName: 'md-cog',
show: 'always'
}
]}
style={styles.toolbar}
/>
);
}
}
var styles = StyleSheet.create({
toolbar: {
backgroundColor: '#e9eaed',
height: 56
}
});
AppRegistry.registerComponent('myapp', () => myapp);
I don't get anyicons...
cannot find any simple enough examples to understand how to use icons
I tried also
<Icon.ToolbarAndroid ...
I get this error:
RNVectorIconsModule not available, did you properly integrate the module?
As @agent_hunt pointed out in the comment, made me realize I didn't follow ALL the install instructions... I needed to add some settings to my android cradle files specifically for the toolbar support.
now it works
Collected from the Internet
Please contact [email protected] to delete if infringement.
Comments