No, this is not a duplicate question. seems to be duplicate link.That is the question that solved the issue of FAB in square which is below <API 16
. But here in API 16.,It is working.Only the above,that mean API 21,it is in SQUARE.
I have implemented a Floating Action Button.Initially it was circle in shape.Later I changed its background color using,
app:backgroundTint="@android:color/holo_green_dark" even I tried
app:borderWidth="0dp" to get in Circle in shape.But these way didn't help me.
In API 16 it is working nice. Only an issue in API 21.
xml:
<android.support.design.widget.FloatingActionButton
android:id="@+id/cartfab1"
style="@style/Layout_ww"
android:layout_above="@+id/txt_categoryName"
android:layout_alignParentEnd="true"
android:layout_alignParentRight="true"
android:layout_gravity="right"
android:layout_marginEnd="40dp"
android:layout_marginRight="40dp"
android:src="@drawable/ic_shopping_cart"
app:backgroundTint="@color/colorPrimary"
app:borderWidth="0dp" />