【问题标题】:Android app icon for different build version不同构建版本的 Android 应用程序图标
【发布时间】:2018-10-07 23:04:51
【问题描述】:

我正在尝试为我的 android 应用程序添加具有自适应图标功能的启动器图标。我面临的问题是该图标与 android Oreo 完美配合,但它显示了 pre Oreo 设备的 android 默认 android 图标。 如何根据不同的android版本设置启动器图标?

图标的清单代码:

android:icon="@mipmap/ic_launcher"
android:roundIcon="@drawable/ic_logo"

ic_launcher.xml

<?xml version="1.0" encoding="utf-8"?>
<adaptive-icon xmlns:android="http://schemas.android.com/apk/res/android">
    <background android:drawable="@mipmap/ic_background"/>
    <foreground android:drawable="@mipmap/ic_foreground"/>
</adaptive-icon>

【问题讨论】:

  • 发布您的清单 XML。
  • 你添加圆形图标了吗?
  • 老问题。初读官方指南
  • @IntelliJAmiya 我遵循了指南,自适应图标正在工作,但无法为 pre-oreo 设备设置图标

标签: android icons


【解决方案1】:

你可以像这样在 Android Studio 中创建自适应图标

右击app > New --> Image Asset

还有这个

你可以选择你的图像、前景层和背景层等等

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2019-05-19
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多