如何向React Native应用程序添加图标 [英] How to add icons to React Native app

查看:268
本文介绍了如何向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

    • iOS Icons

      • Set AppIcon in Images.xcassets.
      • Add 9 different size icons:
        • 29pt
        • 29pt*2
        • 29pt*3
        • 40pt*2
        • 40pt*3
        • 57pt
        • 57pt*2
        • 60pt*2
        • 60pt*3.
        • 图片.xcassets 将如下所示:


          • ic_launcher.png 放入文件夹 [PrjDir] /机器人/应用程序/ SRC /主/ RES / mip映射 - * / 。在$ code> mipmap-hdpi 。

          • 48 * 48 ic_launcher.png in mipmap-mdpi

          • 96 * 96 ic_launcher.png in mipmap-xhdpi

          • 144 * 144 ic_launcher.png in mipmap-xxhdpi

          • 192 * 192 ic_launcher.png in mipmap-xxxhdpi

          • Put ic_launcher.png in folders [PrjDir]/android/app/src/main/res/mipmap-*/.
            • 72*72 ic_launcher.png in mipmap-hdpi.
            • 48*48 ic_launcher.png in mipmap-mdpi.
            • 96*96 ic_launcher.png in mipmap-xhdpi.
            • 144*144 ic_launcher.png in mipmap-xxhdpi.
            • 192*192 ic_launcher.png in mipmap-xxxhdpi.

            这篇关于如何向React Native应用程序添加图标的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆