? They seem to affect each other, but I am not sure how exactly.
f
Filip Wiesner
02/08/2022, 1:06 PM
elevation
in the material design refers to the theoretical elevation of the element and the resulting shadow. The
zIndex
should be purely the draw order in a scope.
Filip Wiesner
02/08/2022, 1:07 PM
From
shadow()
modifier documentation:
Note that elevation is only affecting the shadow size and doesn't change the drawing order. Use a androidx.compose.ui.zIndex modifier if you want to draw the elements with larger elevation after all the elements with a smaller one.