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
Asked
Active
Viewed 5,293 times
7
-
you have to set R.color.Transparent for imageview – Piyush Sep 21 '13 at 06:27
-
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. – user2298296 Sep 21 '13 at 06:32
1 Answers
4
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

Tushar Pandey
- 4,557
- 4
- 33
- 50

Anchit Mittal
- 3,412
- 4
- 28
- 48