As I just answered to someone else, I think the first step in "how do I do this neat UI trick?" should always be to check out wasabeef's amazing collection of UI libraries . In your case, check out Maskable Layout. With it, you provide a drawable to use as a mask for your image.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.