I updated my android app to the new material design, but I also wanted to add some shadow or elevation to the Toolbar. There seem to be some (hacky) ways of doing it via ima
A simple solution, when using CoordinatorLayout, is to anchor an ImageView with the "shadow" just below the AppBarLayout, or Toolbar. This even works with CollapsingToolbarLayout, and it's correctly rendered atop the "content":
Create a res/layout/app_bar_shadow.xml file, which will only be use on pre-Lollipop devices:
Create an "empty" res/layout-v21/app_bar_shadow.xml file, used for Android 5+ devices:
Finally, an appropriate res/drawable/shadow_app_bar.xml: