mudit mudit - 1 year ago 330
Android Question

Set transparent background of an imageview in Android

I am using a web view in which I am adding an image view. Now I want to set the background of this image view transparent. I have tried this:


<color name="trans">#00000000 </color>

Answer Source

In your XML set Background attribute to any color White(#FFFFFF) shade or Black(#000000) shade. If you want transparency, just put another pair of hexadecimal numbers to represent the alpha (= transparency) before the actual color hash code. Adding 00 will make it completely transparent, FF completely opaque. For example, putting 80 will make it half-transparent:


This will change any color you want to transparent one.. :)

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download