How do I show a vector icon in my ToolbarAndroid from react-native-vector-icons (react native)

DS_web_developer

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?

DS_web_developer

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.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How do I show a vector icon in my ToolbarAndroid from react-native-vector-icons (react native)

From Dev

React Native Android - How to set the logo icon in ToolBarAndroid?

From Dev

React Native Android - How to set the logo icon in ToolBarAndroid?

From Dev

Switching from React Native Icons to React Native Vector Icons when using Scrollable Tab View

From Dev

react-native-vector-icons Android

From Dev

How to link react-native-vector-icons to project

From Dev

How to invert react native vector icon buttons color?

From Dev

Icons not loading correctly react-native-vector-icons

From Dev

react-native - Navigator and toolbarAndroid

From Java

React native vector icon not working on current version 0.60

From Dev

how do I include native module (not installed from npm) in my react-native application

From Dev

React Native - Using ToolbarAndroid with Navigator's navigationBar

From Dev

React-Native ToolbarAndroid does not support fontFamily

From Dev

React-Native ToolbarAndroid does not support fontFamily

From Dev

How do I use Crashlytics for my React Native Android App?

From Dev

Dropdown icon in ToolbarAndroid + catching title tap event + search input (react native)

From Dev

How do I display all of the images from my Firebase Storage in React Native without needing image names?

From Dev

How to display an icon in React Native?

From Dev

How do i center the Title on React Natives ToolbarAndroid?

From Dev

How do I access ReactContext from Java code in React Native?

From Dev

React native icons

From Dev

How do I enable multidex for react native?

From Dev

How do I properly debug in React Native?

From Java

How can I put an icon inside a TextInput in React Native?

From Java

How to add icons to React Native app

From Dev

How to model a button with icons in react-native

From Dev

How do I refactor a response from Parse (or any data source) in React or React Native?

From Dev

How to set toolbar action icon in React Native?

From Dev

How do I install a React Native application on my device without the development server and debugging?

Related Related

  1. 1

    How do I show a vector icon in my ToolbarAndroid from react-native-vector-icons (react native)

  2. 2

    React Native Android - How to set the logo icon in ToolBarAndroid?

  3. 3

    React Native Android - How to set the logo icon in ToolBarAndroid?

  4. 4

    Switching from React Native Icons to React Native Vector Icons when using Scrollable Tab View

  5. 5

    react-native-vector-icons Android

  6. 6

    How to link react-native-vector-icons to project

  7. 7

    How to invert react native vector icon buttons color?

  8. 8

    Icons not loading correctly react-native-vector-icons

  9. 9

    react-native - Navigator and toolbarAndroid

  10. 10

    React native vector icon not working on current version 0.60

  11. 11

    how do I include native module (not installed from npm) in my react-native application

  12. 12

    React Native - Using ToolbarAndroid with Navigator's navigationBar

  13. 13

    React-Native ToolbarAndroid does not support fontFamily

  14. 14

    React-Native ToolbarAndroid does not support fontFamily

  15. 15

    How do I use Crashlytics for my React Native Android App?

  16. 16

    Dropdown icon in ToolbarAndroid + catching title tap event + search input (react native)

  17. 17

    How do I display all of the images from my Firebase Storage in React Native without needing image names?

  18. 18

    How to display an icon in React Native?

  19. 19

    How do i center the Title on React Natives ToolbarAndroid?

  20. 20

    How do I access ReactContext from Java code in React Native?

  21. 21

    React native icons

  22. 22

    How do I enable multidex for react native?

  23. 23

    How do I properly debug in React Native?

  24. 24

    How can I put an icon inside a TextInput in React Native?

  25. 25

    How to add icons to React Native app

  26. 26

    How to model a button with icons in react-native

  27. 27

    How do I refactor a response from Parse (or any data source) in React or React Native?

  28. 28

    How to set toolbar action icon in React Native?

  29. 29

    How do I install a React Native application on my device without the development server and debugging?

HotTag

Archive