the icon shows in a screen/page, but won't show in the bottom navigation. Solutions that I've tried:
- Follow the installation guide from github, I've tried both the GRADLE & MANUAL options, but same result
- Have tried to
./gradlew clean
thennpx react-native run-android
, but same result - Have tried to
npx react-native link react-native-vector-icons
thennpx react-native run-android
, but same result
screenshot bottom nav bar
screenshot setting screen
It does appear in screen/page as shown in above screenshot, but won't show in the bottom navigation.
NOTE: I've tested both in emulator and real android device, but still got same result!
Code for the bottom tab
import React from 'react'
import { StyleSheet, Text, View } from 'react-native'
import Ionicons from 'react-native-vector-icons/Ionicons'
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs'
import ProductNavigation from './ProductNavigation'
import SettingScreen from '../screen/SettingScreen'
const BottomTab = createBottomTabNavigator();
const BottomTabNav = () => {
return (
<BottomTab.Navigator>
<BottomTab.Screen
name="Home"
component={ProductNavigation}
options={{
tabBarLabel: "Home",
tabBarIcon:({color, size}) => {
<Ionicons name="home-outline" color={color} size={size} />
}}} />
<BottomTab.Screen
name="Settings"
component={SettingScreen}
options={{
tabBarLabel: "Settings",
tabBarIcon: ({color, size}) => {
<Ionicons name="settings-outline" color={color} size={size}
/>
}}} />
</BottomTab.Navigator>
)
}
export default BottomTabNav
const styles = StyleSheet.create({})
Also can you help why does the bottom tab goes to the next page?? where should I edit the code, thanks in advance. Below is the Screenshot: