去除ImageView的透明区域 [英] Removing transparent area in ImageView
本文介绍了去除ImageView的透明区域的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个面具的形象,这个形象是透明的,我会动态改变图像大小。的问题是,图像被显示在一个正方形/矩形的形式。在的ImageView
也显示透明区域形象,所以如何去除透明区域?
I have one mask image, this image is transparent and I will change the image size dynamically. The problem is that the image is displayed in a square/rectangle form. The ImageView
is also displaying the transparent area image, so how to remove the transparent area?
图片是:
推荐答案
如果你想增加大小ImageView的大小变化,那么你必须设置图片为背景
。
If you want to increase size as Imageview size change then you have to set Image as its background
.
尝试使用 setBackgroundResource()
你可以能够增加你的ImageView图片
Try using setBackgroundResource()
you can able to increase your ImageView image
这篇关于去除ImageView的透明区域的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文