7

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

user2298296
  • 91
  • 1
  • 4

1 Answers1

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