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
I think the best solution is to put a gradient shadow view below the toolbar and manipulate with visibility depends on device sdk.
toolbar.xml
toolbar_shadow.xml
MainActivity.class
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.LOLLIPOP) {
findViewById(R.id.shadow_view).setVisibility(View.VISIBLE);
}