android the tabbar not show icon
the tabbar in android not show icon
i follow the example
cd react-navigation
npm install
cd examples/NavigationPlayground
npm install
cd ../..
react-native start
cd examples/NavigationPlayground
react-native run-ios # ignore packager starting error
react-native run-android # ignore packager starting error
the ios platform tabbar show the icon but the android not show icon
and i follow the doc on reactnavigation.org find hidden the header when use visible i use header:{visible:false} no effect on ios
You have to set showIcon to true on Android, as it's false by default.
Does this not work for TabBarBottom on Android?
It works for on tab bar bottom this is my code:
in main.js
(showIcon: true is on the 3rd line)
tabBarOptions: {
upperCaseLabel: false,
showIcon: true,
style: {
width: SCREEN_WIDTH,
backgroundColor: '#4586e0',
},
indicatorStyle: {
backgroundColor: 'white'
},
labelStyle: {
fontSize: 14,
color: "white",
fontFamily: "kohinoor"
},
},
tabBarPosition: 'bottom',
swipeEnabled: false,
animationEnabled: false,
lazy: true
})
},
IN the component
static navigationOptions = {
header: null,
title: "Contacts",
tabBarIcon: () => {
return <Icon name="person-pin-circle" size={25} color={"white"} />;
}
}
@EsdrasEtrenne I need to display the footer images on tab navigator. How can I display it? I tried with Image source = {image.png} but it did not help yet.
Also, I have set showIcon: true, it also not working. Kindly provide your inputs
I think you would need to update the tabBarIcon key in navigationOptions to return an image component with the correct image source. I have it set up to return an icon component above