Reputation: 86
<ToolbarAndroid
....
logo={require('./hawk.png')}
/>
How can I use vector icons. instead of png?
Upvotes: 1
Views: 567
Reputation: 136
You can use it like this.
import {ToolbarAndroid} from 'react-native';
import Icon from 'react-native-vector-icons/MaterialIcons';
...
action() {
//code
}
...
<ToolbarAndroid>
<Icon name="nameOfIcon" size={26} color="black" style={{margin: 10}} onPress={this.action.bind(this)}/>
</ToolbarAndroid>
You can use size, color, name or style based on your requirement.
Upvotes: 2