简体   繁体   English

为什么我的启动器图标看起来不同?

[英]Why does my launcher icon look different?

See the image: 见图片:

在此处输入图片说明

Why does my icon look different to the other icons on the screen? 为什么我的图标看起来与屏幕上的其他图标不同? In Android Studio, I set trim to zero and yet it still shows up like this on my phone. 在Android Studio中,我将trim设置为零,但它仍然像这样在手机上显示。 I have Nova Launcher installed which makes all my apps have rounded icons, but look at the Google Maps, and Instagram, how do I get my icon to fill the circle? 我安装了Nova Launcher,这使我所有的应用程序都具有圆形的图标,但是看看Google Maps和Instagram,如何使我的图标填充整个圆圈?

WONDERING WHY IT DOES THIS REQUIRES VERY SIMPLE EXPLANATION: in new boiler plate code that comes on android studio project generation it makes some extra files in the mip map ! 奇怪为什么这需要非常简单的解释:在android studio项目生成随附的新样板代码中,它会在mip映射中添加一些额外的文件! as for the big api based phones have a nature to put a round bracket icon behind every launcher icon of the apps! 至于基于大型api的手机,自然可以在应用程序的每个启动器图标后面放置一个圆括号图标! So All you need to do is very simple if you want to override that! 因此,如果要覆盖它,您要做的就是非常简单! follow the image based foot steps shown below 遵循下面显示的基于图像的脚步

HERE IS HOW YOU CAN AD D A CUSTOM ICON WITHOUT ANY ROUND whit icon behind it! 在这里,您可以在没有任何圆形图标的情况下添加自定义图标!

STEP ONE! 第一步! .

go on your any res folder drawable or mipmap and right click and reach to the option shown in the image: 继续在您的任何res文件夹可绘制或mipmap上单击鼠标右键,然后转到图像中显示的选项:

在此处输入图片说明

STEP TWO! 第二步! .

After clicking on your image asset it will ask to make icons for both old and new phones! 点击图片素材后,它将要求为新旧手机制作图标! but we don't have to select that! 但我们不必选择它! ok? 好? see the image for it! 看到它的图像!

在此处输入图片说明

STEP THREE! 第三步! .

CLICK THE ICON TYPE SPINNER(DROP DOWN) and select mipmap legacy only like shown here 单击图标类型旋转器(向下拖动),然后仅选择mipmap旧版,如下所示

在此处输入图片说明

STEP FOUR! 第四步! .

CUSTOMISE YOUR PICTURE LIKE shown here! 自定义您喜欢的图片,如此处所示! by back ground etc how ever you like! 通过背景等你喜欢什么!

在此处输入图片说明

STEP FIVE! 第五步! .

You will see images being saved only in mipmap folder not in the ic_launcher round folder 您将看到图像仅保存在mipmap文件夹中,而不是ic_launcher圆形文件夹中

在此处输入图片说明

STEP SIX! 第六步! .

You can see the image you created as icon in ic_launcher folder but 您可以在ic_launcher文件夹中看到以图标形式创建的图像,但是 在此处输入图片说明

STEP SEVEN! 第七步! .

THERE IS a GOTCHA STILL SOME IC_LAUNCHER BUILTIN TEMPLATE PROVIDED files are there you have to delete that folder as shown 有一个GOTCHA仍然有些IC_LAUNCHER BUILTIN TEMPLATE提供的文件,您必须删除该文件夹,如图所示

:It will cause the alert that how we are supposed not to do that but its ok! :这将引起警报,提示我们不应该这样做,但是还可以! just follow the step 8 and you will have the icon of your choice no matter what phone you are testing your app on! 只需按照步骤8进行操作 ,无论使用哪种手机测试应用程序,您都将拥有选择的图标!

在此处输入图片说明 在此处输入图片说明

STEP EIGHT! 第八步! .

GO TO YOUR MANIFEST FILE AND DELETE THE HIGHLIGHTED line and you are all set! 转到清单文件并删除突出显示的行,一切就绪! ^_^ ^ _ ^

在此处输入图片说明

With the release of Android Oreo the launcher icons changed a lot. 随着Android Oreo的发布,启动器图标发生了很大变化。 But with Image Asset Studio (integrated in Android Studio) we can easily generate everything we need (26+ and 25- APIs). 但是,借助Image Asset Studio(集成在Android Studio中),我们可以轻松生成所需的一切(26个和25-个API)。 Here is explained how these new adaptive icons work. 在此说明这些新的adaptive icons如何工作。

In this article you can read everything you need to know step by step, but in summary: you need two icons (square and rounded) for 25- APIs, and two layers (background and icon image) for 26+ APIs. 本文中,您可以逐步阅读需要了解的所有内容,但总而言之:对于25个API,您需要两个图标(方形和圆形),对于26个以上API,您需要两个图层(背景和图标图像)。 Android Studio will generate everything you need if you can provide those elements. 如果您可以提供这些元素,则Android Studio会生成您所需的一切。

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

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