ic_launcher、ic_launcher_foreground 和 ic_launcher_round 之间的区别

Bas*_*man 5 icons android-studio

我正在使用 Android Studio (v 3.4.1) 创建自适应启动器图标。我对它生成的 PNG 文件感到困惑。

我使用 Asset Studio 创建启动器图标(自适应和传统)。这个过程很简单。但我质疑是否需要某些输出文件。

输出包括以下内容:

\release\res\mipmap-anydpi-v26

  • ic_launcher.xml
  • ic_launcher_round.xml

\release\res\mipmap-nndpi(对于每个像素密度)

  • ic_launcher.png
  • ic_launcher_foreground.png
  • ic_launcher_round.png

\release\res\values\ic_launcher_background.xml

我认为每个 \mipmap-nndpi 文件夹只需要 [foreground & round].png 文件。当我手动创建图标时,我没有创建 ic_launcher.png 并且没有看到区别。

最低 Target SDK 28+ 是否需要 ic_launcher.png?

小智 -1

看看https://github.com/Viperusgit/AdaptiveIcons

  • ic_launcher_forground是前图像的名称
  • ic_launcher是旧版本 android 的图标
  • ic_launcher_round是旧像素的图标