Setting transparent cutouts in xml drawable

Does Android support transparent cutouts in XML form drawings?

NOTE. I am using Android Studio and targeting API 14+.

I am trying to create some simple images with one and several objects. But for now, if I specify a color with alpha 0, then I do not see the form at all. I want this foreground shape with alpha 0 for color to create a transparent area that cuts out the layers below it.

I would prefer not to do this in code.

Can someone show me an example of how to do this?

+4
source share

All Articles