如何向React Native应用程序添加图标 [英] How to add icons to React Native app
本文介绍了如何向React Native应用程序添加图标的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在制作React Native应用。我想自定义应用程序图标(表示您单击以启动应用程序的图标)。我用Google搜索了这个,但我一直在寻找不同类型的图标来引用不同的东西。如何将这些类型的图标添加到应用程序?
I am making a React Native app. I would like to customize the app icon (meaning the icon that you click on to start the app). I have Googled this, but I keep finding different types of icons that refer to different things. How do I add these types of icons to the app?
推荐答案
iOS图标
- 在
Images.xcassets
中设置AppIcon
。 - 添加9个不同大小的图标:
-
29pt
-
29pt * 2
-
29pt * 3
-
40pt * 2
-
40pt * 3
-
57pt
-
57pt * 2
-
60pt * 2
-
60pt * 3
。 - Set
AppIcon
inImages.xcassets
. - Add 9 different size icons:
29pt
29pt*2
29pt*3
40pt*2
40pt*3
57pt
57pt*2
60pt*2
60pt*3
.- 将
ic_launcher.png
放入文件夹[PrjDir] /机器人/应用程序/ SRC /主/ RES / mip映射 - * /
。在$ code> mipmap-hdpi 。 - 48 * 48
ic_launcher.png
inmipmap-mdpi
。 - 96 * 96
ic_launcher.png
inmipmap-xhdpi
。 - 144 * 144
ic_launcher.png
inmipmap-xxhdpi
。 - 192 * 192
ic_launcher.png
inmipmap-xxxhdpi
。 - Put
ic_launcher.png
in folders[PrjDir]/android/app/src/main/res/mipmap-*/
.- 72*72
ic_launcher.png
inmipmap-hdpi
. - 48*48
ic_launcher.png
inmipmap-mdpi
. - 96*96
ic_launcher.png
inmipmap-xhdpi
. - 144*144
ic_launcher.png
inmipmap-xxhdpi
. - 192*192
ic_launcher.png
inmipmap-xxxhdpi
.
这篇关于如何向React Native应用程序添加图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
- 72*72
图片.xcassets
将如下所示:
iOS Icons
-
查看全文