简体   繁体   中英

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. 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?

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 ! as for the big api based phones have a nature to put a round bracket icon behind every launcher icon of the apps! 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:

在此处输入图片说明

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

在此处输入图片说明

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

在此处输入图片说明

STEP SIX! .

You can see the image you created as icon in ic_launcher folder but 在此处输入图片说明

STEP SEVEN! .

THERE IS a GOTCHA STILL SOME IC_LAUNCHER BUILTIN TEMPLATE PROVIDED files are there you have to delete that folder as shown

: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!

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

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. But with Image Asset Studio (integrated in Android Studio) we can easily generate everything we need (26+ and 25- APIs). Here is explained how these new adaptive icons work.

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. Android Studio will generate everything you need if you can provide those elements.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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