面膜ImageView的一个形状 [英] Mask ImageView with a shape

查看:130
本文介绍了面膜ImageView的一个形状的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有可能掩盖的ImageView 与形状如圆?我似乎无法弄清楚如何做到这一点。我想最好想这样做在XML文件中。

Is it possible to mask an ImageView with a shape such as a circle? I cant seem to figure out how to do this. I would ideally like to do this in the xml file.

推荐答案

您可以定义自定义形状的绘制文件夹中的XML文件中,称他们为ImageView的背景。

You can define custom shapes xml files in the drawable folder, the call them as background in imageview.

这篇关于面膜ImageView的一个形状的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆