How To Make Android Toolbar Elevation Working On Pre-Lollipop Devices
Step 1. Make a material toolbar. (How To Make Material Design Actionbar/Toolbar In 7 Simple Steps) Step 2. Create a new drawable desource file " shadow.xml". <?xml version="1.0" encoding="utf-8"?> <shape android:shape="rectangle" xmlns:android="http://schemas.android.com/apk/res/android"> <gradient android:startColor="@android:color/transparent" android:endColor="#40000000" android:angle="90"/> </shape> Step 3. Open " activity_main.xml" and add these lines between "include" and "RelativeLayout" Tags. <FrameLayout android:layout_width="fill_parent" android:layout_height="4dp" android:background="@drawable/shadow" android:layout_below="@+id/toolbar" android:visibility="invisible" /> Now y