I want to create a custom title bar like this using a linear layout. I can not work out how to get that 3D/shodow effect at the bottom. Any suggestions?
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item >
<shape
android:shape="rectangle">
<solid android:color="@android:color/darker_gray" />
<corners android:radius="0dp"/>
</shape>
</item>
<item android:bottom="1dp" android:top="1dp">
<shape
android:shape="rectangle">
<solid android:color="#019BD9"/>
<corners android:radius="0dp"/>
</shape>
</item>
</layer-list>
To use Toolbar just add it in your layout.
reference it on java file as mToolBar.
and do the small code
Note: setSupportActionbar() is only available when you extend ActionBarActivity or AppCompactActivity. instead the only Activity
[Alternative]
And if you don't want to go with the Toolbar. just add the below view where you want shadow.
and here is toolbar_dropshadow drawable