Home > Net >  How can I create a shape and change its alpha in a specific place on a surface?
How can I create a shape and change its alpha in a specific place on a surface?

Time:04-23

Let's say i have a surface and my background color is Red;

Surface(modifier = Modifier.fillMaxSize().alpha(0.1f)){}

How can i create a shape (example: Rectangle) on surface like hole so i can see the background color not with alpha 0.1f, with alpha 1.0f from inside this rectangle shape?

i want it for tutorial screen in my app, i am open to any idea except my example.

Example of my goal; enter image description here

CodePudding user response:

All kinds of materials that will meet your needs are actually in this project. It may be your choice to use and examine the codes.

Library

  • Related