alorma
09/09/2021, 1:22 PMSurfaces
on it, first of them has an elevation of 8.dp
, however the shadow is not displayed.
If i add some bottom padding to the Surface, then it shows... but... why is that? shouldn't shadow draw over other elements?Albert Chang
09/09/2021, 1:31 PMalorma
09/09/2021, 1:33 PMalorma
09/09/2021, 1:34 PMcolumn {
surface(blueish, elevation=8.dp)
surface
surface
surface
}
Albert Chang
09/09/2021, 1:35 PMModifier.zIndex(1f)
to the first surface.alorma
09/09/2021, 1:39 PMalorma
09/09/2021, 1:55 PMAlbert Chang
09/09/2021, 1:58 PMModifier.zIndex()
explains it.
A child with larger zIndex will be drawn on top of all the children with smaller zIndex. When children have the same zIndex the original order in which the parent placed the children is used.
alorma
09/09/2021, 2:05 PM