Removing transparent area in ImageView

廉价感情. 提交于 2020-03-02 07:00:28

问题


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?

The image is:


回答1:


If you want to increase size as Imageview size change then you have to set Image as its background.

Try using setBackgroundResource() you can able to increase your ImageView image




回答2:


for changing the size of image dynamically you can use scale animation,in layout of android.



来源:https://stackoverflow.com/questions/7430441/removing-transparent-area-in-imageview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!