I'm trying to include a floating action button into my app. This works fine for devices with API 21 and above. But for devices with an earlier version, the drop shadow looks like this:
The xml for the floating action button looks like this:
<android.support.design.widget.FloatingActionButton
android:id="@+id/floatingActionButton"
android:layout_width="40dp"
android:layout_height="40dp"
android:clickable="true"
android:src="@drawable/ic_fab_add"
android:layout_marginLeft="16dp"
app:elevation="6dp"
app:borderWidth="0dp"
android:layout_above="@+id/destinationContainer" />
I use the support design library 'com.android.support:design:23.1.1'to include the floating action button.
Does anybody know what I do wrong?
Thanks.
EDIT:
I figured out, that the custom size of 40dp is the problem. The broken shadows probably only appear in the space between 40dp and the original size.... This does not fix my problem, but its a hint