https://kotlinlang.org logo
Title
p

Peter Mandeljc

06/29/2021, 3:23 PM
I'm getting weird shadow for dark theme, any ideas?
Column(modifier = Modifier.padding(16.dp)) {
        Surface(
            elevation = 10.dp,
            modifier = Modifier.fillMaxWidth(),
        ) {
            Text(text = "Test")
        }
    }
a

Abhishek Dewan

06/29/2021, 3:37 PM
the shadow I think is a natural consequence of using elevation!
p

Peter Mandeljc

06/29/2021, 3:38 PM
I know, I want shadow 🙂
just dark theme shadow is weird, dunno
l

Louis Pullen-Freilich [G]

06/29/2021, 4:06 PM
What do you mean by ‘shadow’, do you mean the elevation overlay? https://material.io/design/color/dark-theme.html#properties Check the elevation section
p

Peter Mandeljc

06/29/2021, 4:13 PM
no, not the surface overlay (tough I'd prefer to avoid it, not sure how yet)
l

Louis Pullen-Freilich [G]

06/29/2021, 4:29 PM
You can use
LocalElevationOverlay
, and provide
null
👍 1
The shadow itself seems weird, is there any transparency involved here?
p

Peter Mandeljc

06/29/2021, 6:35 PM
not that I'm aware of
the shadow gets fixed, after I resize window of emulator to be larger, weird
thanks for helping!