[英]Icon not showing in react-native
我正在使用 react-native-vector-icons 库在标签栏中显示图标,如下所示:
import FontAwesome from 'react-native-vector-icons/FontAwesome'; <FontAwesome name='trophy' />
但是它没有显示图标,那该怎么办呢?
图标显示错误,因为找不到字体。 我认为您需要检查捆绑包是否包含这些.ttf 文件。
如果没有, 这是我从文档中找到的指南
我用您的代码测试的图标结果:
代码:
结果:
[英]React-native icon inline with text
[英]TabNavigator customize icon error in react-native
[英]React-native Navigation Add Hamburger Icon
[英]react-native icon falls under View
[英]react-native add fragment to view is not showing
[英]React-native fontawesome some icons are not showing
[英]React-native firebase foreground notifications are not showing
[英]React-native app is not showing the screens
[英]React-Native - Image not showing in Android emulator
[英]Expo React-Native isn't changing Android Adaptive Icon
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.