Reputation: 3
I want to add icon in tabView for android. My code looks:
<ScrollableTabView>
<View style={styles.container} tabLabel='Menu Button'>
</View>
<View style={styles.container} tabLabel='My App'>
</View>
<View style={styles.container} tabLabel='Settings'>
</View>
</ScrollableTabView>
I want to have icons instead of Menu Button and Settings. how can I use icons instead of tabLabel??
Upvotes: 0
Views: 760
Reputation: 306
I assume you are using : https://github.com/skv-headless/react-native-scrollable-tab-view
This solution should work:
<ScrollableTabView>
<View style={styles.container} tabLabel='android-menu'>
</View>
<View style={styles.container} tabLabel='My App'>
</View>
<View style={styles.container} tabLabel='android-settings'>
</View>
</ScrollableTabView>
The complete list of icons is available here:
Edit 1:
This example demonstrates icons to be used on tabLabel instead of text: https://github.com/skv-headless/react-native-scrollable-tab-view/tree/master/examples/FacebookTabsExample
Upvotes: 1