0

I am trying to add launcher icon in my app but the problem is that my compile version is 28 and according to oreo and above we must implement foreground and background icon layer in our app which I don't want because I want to show only my icon in app without any background. Here is my icon, can anyone tell me how I can implement this icon in my app without any background layer and it also support all devices. Here is the iconapp icon which i want show

and here is the example which i want to implement in my app. You can see "eBible" and "Easy to understand bible" icon which is without any background layer

enter image description here

Syed Ahmed Jamil
  • 1,424
  • 2
  • 12
  • 26
skyworld
  • 65
  • 8

2 Answers2

1

Go to -

Image Asset -> Foreground layer (here browse your icon)

Image Asset -> Background layer (here browse any transparent icon)

Image Asset -> Legacy (here give none shape for icon)

enter image description here

Prachi Singh
  • 544
  • 2
  • 7
0

First you right click on your drawable folder and select new -> image asset.

Set the Icon Type to "Launcher Icons (Legacy only)", set the path and set the Shape to "None". Now you got a drawable with your logo and no background and you can set this now as a app icon.

See this question if you don't know how to set the icon Set icon for Android application

Configure Image Asset

EDIT: In any Android level < 25 it is not possible to set a transparent background.

Google said: background drawables must be opaque whilst foregrounds can contain transparency."

https://medium.com/google-developers/implementing-adaptive-icons-1e4d1795470e

Nils Walker
  • 100
  • 1
  • 1
  • 7
  • i already tried this but problem is that it will automatically change my background color in black when used this in oreo device – skyworld Jul 02 '19 at 06:32
  • Google said (in Android API 25 Oreo): "background drawables must be opaque whilst foregrounds can contain transparency." – Nils Walker Jul 02 '19 at 07:44
  • so what trick i used so my only icon show in app without any background please tell me and you can also see my example image – skyworld Jul 02 '19 at 08:00