Search code examples
androidkotlinphotoshopandroid-vectordrawable

How to import png without background android studio


I want to be able to use external images in my android app,but i don't know how to deal with them,in the best case scenario they have a grey background:

enter image description here

How do i remove the grey background or any background to have a clean icon like the clip art that already exists in android studio(I already tried with apps and it's still drawing the background)


Solution

  • Please make sure the image is .svg vector and not png and follow this to import. stackoverflow.com/a/67056210/7093155

    I think the problem with the png you are using is that the background is not entirely transparent. If you are certain it is, then setting the background with android:background="@android:color/transparent"