Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

downloaded png image with transparent background shows with black background

In my android application I downloaded some png image and write them in sd card. when I show them in image view they are showing with black background. the original images have transparent background. How I can keep the background transparent. Please help me. I use PNG format to compress and write it to sd card

like image 959
user2298296 Avatar asked Sep 21 '13 06:09

user2298296


1 Answers

Set The View Background as

R.color.transparent

or in xml like

android:background="@android:color/transparent"

Edited :

Thanks for reply. yes I did this. I did just now One more thing, I set canvas color android.R.color.transparent and it worked

like image 178
Anchit Mittal Avatar answered Sep 30 '22 19:09

Anchit Mittal