The transparent part of an Icon is shown white

I recompiled an application that I had made in 2018 due to a problem that arose when I changed my cell phone and the icon that previously showed well now shows the transparent part white. In the image it is seen how the old version is shown well and in the new one it does not.


Use a translator to translate this text into English...

1 Like

hello @MarioDD may I have the .png file that you have used as an icon

1 Like

Hello @Know_About_IT This was the png I used
Icon

I have a question, the icon was transparent on the same device as tested before, or you have changed your device :sweat_smile:

Icon-removebg-preview
Dowload this image and set it as your icon may be this helps you

May I know what you modified in it ?
:thinking:

I remove its background

It was already removed in the image sent by @MarioDD

here

https://medium.com/google-design/understanding-android-adaptive-icons-cee8a9de93e2
https://medium.com/google-design/designing-adaptive-icons-515af294c783
https://developer.android.com/guide/practices/ui_guidelines/icon_design_adaptive

You would need to change the file extension from png to txt to be sure the upload has no effect on the image.

@Know_About_IT The image I uploaded is on the new device. The old app looks good and the new one with the same image looks bad. What I modify is the address of the internal storage to the new system due to the issue of permissions in android 10 to be able to load a table. My cell phone in case it helps them is a xiaomi redmi note 9 pro

@Faraz_Firoz that image still shows the transparent part as white

@ChrisWard keeps giving me the same result ...

Anke I've been looking at the adaptive icons but I don't understand how I should modify it since png use only one layer. I read in another post about icons that the images have to have more resolution, and I tried to create a new one of 512x512 and it still looks bad.

I also tried downloading any image with transparencies from the web and the result is the same.

Thank you all very much for your reply.

1 Like

To give a launcher icon a transparent background in Android 8+ (API ≥ 26), your app has to target API 25 or lower. But if your app is published on the Play Store, all apps must currently target Android 10 (API 29). From Aug 2021 it must target Android 11 for new apps (and from Nov 2021 also for updates).

So it is no longer possible to get a transparent background for the launcher icon if your app is to be published in the Play Store.

1 Like

Hi MarioDD, Anke is 101% right - your icon cannot have transparency for modern Android.

So you will need to redesign it without any transparency. If you create a master png image 1024 x 1024 pixels in size, the compiler will create all of the resolutions, shapes and sizes required (which is quite a few, some of which also need an XML file). Note this should only be done in the final build and you should never try to run the Companion with the master image in situ.