I\'m using the new FloatingActionButton from the Google Design Library and I am getting some strange padding/margin problems. This image (with developer layout options on) i
No more fiddling with styles.xml
or with .java
files. Let me make it simple.
You can use
app:useCompatPadding="true"
and remove custom margins to maintain same margins across different versions of android
The extra margin/padding you saw on the FAB in your second picture is due to this compatPadding on pre-lollipop devices. If this property is not set, it gets applied on pre-lollopop devices and NOT in lollipop+ devices.
Proof of concept