简体   繁体   中英

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:

在此处输入图像描述

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)

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"

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