【问题标题】:How do I change the app icon in the 'Recents' Screen?如何更改“最近”屏幕中的应用程序图标?
【发布时间】:2020-08-14 14:39:52
【问题描述】:

我知道如何更改我的应用程序的图标,但是当我查看Recents Screen 时,图标是默认的。

应用程序图标(到目前为止一切正常):

我最近的屏幕中的图标:

这是我的“AndroidManifest.xml”的“应用程序”标签

<application
    android:name=".App"
    android:allowBackup="true"
    android:icon="@mipmap/iconout"
    android:roundIcon="@mipmap/iconout"
    android:logo="@mipmap/iconout"
    android:label="@string/app_name"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">

我已经尝试了很多在这个平台上找到的解决方案(没有用),例如:

  1. 文件->新建->图片资源->选择图片..
  2. 安装和卸载应用程序
  3. 构建和清理项目
  4. 删除我项目中的所有默认图标
  5. 将我的图标从 mipmap 文件夹拖放到可绘制对象中

还有其他可能的解决方案吗?提前谢谢!

【问题讨论】:

    标签: android icons manifest android-recents


    【解决方案1】:

    好的,我找到了解决方案,并决定为将来遇到同样问题的任何人回答。

    我通过在AndroidManifest.xml 的主要activity 标记声明中添加android:icon="@mipmap/iconout" 来修复它,如下所示:

    <activity
            android:icon="@mipmap/iconout"
            android:name=".MainActivity"
            android:label="@string/app_name"
            android:theme="@style/AppTheme.NoActionBar">
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
    
                <category android:name="android.intent.category.LAUNCHER" />
            </intent-filter>
        </activity>
    

    这是最终结果:

    【讨论】:

      【解决方案2】:

      尝试将图标的格式更改为 PNG。这对我有用。

      或者你可以在不同的设备上尝试应用,看看是不是模拟器/手机的问题。

      【讨论】:

      • 其实是个png :(
      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2013-08-15
      • 1970-01-01
      • 2021-10-14
      • 2019-08-21
      • 1970-01-01
      • 1970-01-01
      • 2018-01-28
      相关资源
      最近更新 更多