Thread
#compose
    z

    zoha131

    1 year ago
    I am not getting any elevation or shadow for this:
    Surface(
                    elevation = 16.dp
                ) {
                    Text(text = "Hello World", modifier = Modifier.padding(16.dp))
                }
    But if I add
    Modifier.drawLayer(shadowElevation = 16f
    then I get shadow. Now my qs is. shouldn’t elevation give us the shadow/elevation?
    Andrey Kulikov

    Andrey Kulikov

    1 year ago
    maybe you wrapped your Surface into some other Surface of the same size so this parent Surface clipped the shadow produced by an inner one? could you share more code?
    z

    zoha131

    1 year ago
    thanks. it was due to clipping.