https://kotlinlang.org logo
#compose
Title
# compose
r

Rihards

02/09/2023, 10:50 AM
How can I change the shape of the shadow that shows up when
.clickable
of modifier is triggered?
2
I have a clickable icon that shows the shadow / elevation on click. It looks bad because it’s just a rectangle that should be changed to circle.
f

Filip Wiesner

02/09/2023, 11:08 AM
You can clip it using
clip(shape)
modifier
Copy code
Modifier
    .clip(CircleShape)
    .background(/* add background if you want */)
    .clickable { /* ... */ },
r

Rihards

02/09/2023, 11:12 AM
Thank You!
3 Views