Android中的ImageView的设定透明背景 [英] Set transparent background of an imageview in Android
本文介绍了Android中的ImageView的设定透明背景的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用中我加入了一个图像查看Web视图。现在我要将此图像视图透明的背景。我曾尝试这样的:
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:
mImageview.setBackgroundResource(R.color.trans);
其中,反
=> <颜色名称=跨>#00000000< /彩色>
推荐答案
在你的 XML
设置背景
属性任何颜色白色(#FFFFFF)
阴影或黑色(#000000)
shade.if你想要的透明度只是把前80实际的散列code。
In your XML
set Background
attribute to any color White(#FFFFFF)
shade or Black(#000000)
shade.if you want transparency just put 80 before the actual hash code.
#80000000
这将改变你想要透明的任何颜色。。:)
This will change any color you want to transparent one.. :)
这篇关于Android中的ImageView的设定透明背景的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文