Live data from Hacker News

Android Toolbar dropshadow on all API levels

news.ycombinator.com

1–3 of 3 posts

Re: Android Toolbar dropshadow on all API levels

#2
There are a few topics on StackOverflow where this gets answered. The short answer: Toolbar is using the "elevation" property, which only Lollipop and above support natively. A simple solution is to manually add the shadow as a drawable to the Toolbar, and hide that when running on SDK 21+.

Re: Android Toolbar dropshadow on all API levels

#3

There are a few topics on StackOverflow where this gets answered. The short answer: Toolbar is using the "elevation" property, which only Lollipop and above support natively. A simple solution is to manually add the shadow as a drawable to the Toolbar, and hide that when running on SDK 21+.

Ya I was hoping that was not the case anymore. I have a temporary work around that adds a dropshadow view on the layout file while the layout-v21 file does NOT have the dropshadow view. Which seems to work, but I wanted to see if there is a better "Best Practice".