简体   繁体   English

应用程序图标启动

[英]App Icon Launch

Quick question I'm trying to change my app's launch icon but it doesn't seem to want to change. 快速问题我正在尝试更改我的应用程序的启动图标但它似乎不想改变。 I changed the dimensions of it to the following for the variety of screen sizes as seen here: http://developer.android.com/guide/practices/ui_guidelines/icon_design_launcher.html 我将其尺寸更改为以下各种屏幕尺寸,如下所示: http//developer.android.com/guide/practices/ui_guidelines/icon_design_launcher.html

  • 36 x 36 for ldpi 36 x 36为ldpi
  • 48 x 48 for mdpi mdpi为48 x 48
  • 72 x 72 for hdpi 72 x 72为hdpi

Plus in the android manifest file I added the following line: 另外在android清单文件中我添加了以下行:

 <application android:icon="@drawable/iss" android:label="Endeavor">

Yet when I run the app and look for it on the phone it's basic launch icon is the default android green icon. 然而,当我运行应用程序并在手机上查找它时,它的基本启动图标是默认的android绿色图标。 What's the problem here? 这有什么问题?

The three icons (for different dimensions) need to be saved respectively as 三个图标(针对不同尺寸)需要分别保存为

drawable-ldpi/iss.png
drawable-mdpi/iss.png
drawable-hdpi/iss.png

Then with your manifest they should be picked up. 然后用你的清单,他们应该被拿起来。 Also, I suggest you move your "Endeavor" value of android:label to your string resources file (usually strings.xml) and change the value here to refer to it. 另外,我建议你将android:label “Endeavor”值移动到你的字符串资源文件(通常是strings.xml),并在这里更改值以引用它。 It'll save you a lot of pain later - trust me. 以后它会为你节省很多痛苦 - 相信我。

尝试卸载应用程序并重新安装....有时图标不会更新:s

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM