【发布时间】:2017-04-29 17:52:57
【问题描述】:
我正在使用create-react-native-app。我想用react-native-vector-icons
但它在 android 屏幕上没有显示任何内容(我在 expo 应用程序上查看它)
这是我所做的:
App.js:
const Courses = TabNavigator({
ReactCourses: { screen: ReactCourses },
NativeCourses: { screen: NativeCourses },
}, {
tabBarOptions: {
activeTintColor: '#e91e63',
swipeEnabled: true,
showIcon:true,
},
});
ReactCourses.js:
import Icon from 'react-native-vector-icons/MaterialIcons';
static navigationOptions = {
tabBarLabel: 'React Courses',
tabBarIcon:({ tintColor }) => (
<Icon
name={'home'}
size={26}
style={[styles.icon, {color: tintColor}]} />
)
}
【问题讨论】:
标签: android react-native react-navigation expo create-react-native-app