https://kotlinlang.org logo
Title
p

pavi2410

06/21/2021, 7:44 AM
BottomNavigation
doesn't cast a shadow upwards, although I've set
elevation = 16.dp
to it.
Update: It is there but not visible enough. I've tried setting elevation to a bigger value like
64.dp
Using
Modifier.shadow
doesn't work at all
a

Alex

06/21/2021, 8:49 AM
This probably happens because of the way android casts shadows
the implied lightsource is slightly above the upper part of the screen
so the bottom bar would receive a shadow cast below (which is outside of the screen area)
j

Javier

06/21/2021, 8:54 AM
p

pavi2410

06/21/2021, 10:58 AM
@Alex Material spec shows shadow upwards https://material.io/components/bottom-navigation#specs

https://storage.googleapis.com/spec-host-backup/mio-components%2Fassets%2F16_mdeMoej9KYqE6_7gV0qw6H-1arSKmK%2Fspecs-bottomnav-mobile-portrait.png

a

Alex

06/24/2021, 5:57 PM
@pavi2410 It does, but its a very subtle little thing, compared to the one it would cast below. The elevation just has a lot less impact on shadows cast upward as opposed to downward.