I need to have a curved bottom view for Toolbar or CardView.
What I've tried:
bg_toolbar.xml
<?xml version="1.0" encoding="utf-8"?>
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
<item>
<shape android:shape="rectangle" />
</item>
<item
android:bottom="0dp"
android:left="-100dp"
android:right="-100dp"
android:top="-80dp">
<shape android:shape="oval">
<solid android:color="@color/colorAccent" />
</shape>
</item>
</layer-list>
Setting this as a background to toolbar voids the appbar elevation (shadow). Also if this background is applied to a CardView background is set but the shadow is not according to shape of the background.
See the below image, I want the shadow to wrap around the curve.