This is my FAB definition:
<android.support.design.widget.FloatingActionButton
android:id="@+id/button_capture_action_show_options"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom|right"
android:layout_margin="16dp"
android:focusable="true"
android:src="@drawable/c"
It seems that there's some extra padding when rendered on pre-lollipop devices and I can't seem to be able to remove it.
Lollipop rendering:
Pre-lollipop rendering:
Any suggestions much appreciated..
This is because of the way padding is implemented in the FAB on pre-Lollipop devices.
There's no way I know of to remove it on pre-Lollipop, but you can make it consistent (i.e. increase the padding on Lollipop and up) by setting app:useCompatPadding="true"
on the FAB in the layout definition, or by using setUseCompatPadding.
It behaves this way because of the way shadows are drawn.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With