Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shadow not being cast upwards properly #20

Open
jt-gilkeson opened this issue May 7, 2016 · 3 comments
Open

Shadow not being cast upwards properly #20

jt-gilkeson opened this issue May 7, 2016 · 3 comments

Comments

@jt-gilkeson
Copy link
Contributor

The shadow being cast by the bottom navigation bar is a normal shadow (like on a button) - the problem is that if you look at the bottom navigation bar material design guidelines and Google Photos you'll notice that the shadow for bottom bars is supposed to be reversed - being cast upwards.

I'm not sure what the "right" way to do this is.

Here's a couple stack overflows that show techniques to make it happen (I'm not suggesting that these ways be used since they feel like hacks).

http://stackoverflow.com/questions/27741567/androidelevation-only-have-shadow-effects-on-the-bottom-side-how-to-make-the-s

http://stackoverflow.com/questions/33577720/how-to-y-offset-the-android-5-lollipop-shadow-direction

The current shadow is much better than no shadow at all.

I'm opening this issue to track a long-term fix for the shadow issue - since this doesn't feel like it will be easy to fix.

I've opened an issue with Google to try to get an answer:
https://code.google.com/p/android/issues/detail?id=209303

@Ashok-Varma
Copy link
Owner

@jt-gilkeson
I already checked google photos. Its not elevation, they added normal shadow view.
When you on the layout bounds. AppBar and also our bottom bar do not consume shadow space because we use the outline.
But if you check the google photos even the shadow us occupying the some space in layout. They added normal XML shadow mostly.
We can't do that since we need to still sync bottom bar with snackBar and FAB, if we occupy that space snackBar can't be moved exactly on top on the bottom bar

@jt-gilkeson
Copy link
Contributor Author

jt-gilkeson commented Jun 22, 2016

https://github.com/umano/AndroidSlidingUpPanel handles the upward shadow pretty well (shadow slides up and down with the bar) - it casts the semi-transparent shadow onto the frame above it, not sure if something similar could be done with the bottom nav bar.

@Khareesh0892
Copy link

@Ashok-Varma Google Play Music does that shadow thing without adding shadow space in the layout. There should be a way to do this.

Here are the snapshots with & without layout bounds FYI.
Snapshot 1 (With layout guidelines):
screenshot_20181122-154454

Snapshot 2 (Without layout guidelines):
screenshot_20181122-154508

I can also do more research on implementation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants