I use a very simple style to format my Toolbar, I use android:elevation to display a shadow under the Toolbar like this:
<style
name="AppToolbarTheme"
parent="AppTheme">
<item name="android:background">@color/colorPrimary</item>
<item name="android:titleTextColor">@android:color/white</item>
<item name="android:elevation">4dip</item>
</style>
And I'm applying it simply like that:
<Toolbar
android:id="@+id/main_toolbar"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:theme="@style/AppToolbarTheme"/>
The shadow displays under the toolbar like I want, howerver it is also somehow applied to the title of the toolbar which looks very weird:
