I am using cardview like this:
<com.google.android.material.card.MaterialCardView
android:id="@+id/togglebuysell"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginLeft="15dp"
android:layout_marginTop="10dp"
android:layout_marginRight="15dp"
android:layout_marginBottom="10dp"
app:cardCornerRadius="15dp"
app:cardElevation="5dp">
The result on devices running api >21 is :
Which is OK
But on devices running api 18 the result is:
The shadow looks bizarre. any solution to fix this on all api versions?