I\'m trying to use a FAB but the icon inside is placing at bottom right of the button:
FAB with icon not centered
This is the FAB definition in the xml:
If you're using material design and using custom sizes:
android:layout_width="80dp"
android:layout_height="80dp"
instead of
android:layout_width="wrap_content"
android:layout_height="wrap_content"
The fix is to use these two properties
app:fabCustomSize="80dp"
app:maxImageSize="70dp"
make sure of this
app:fabCustomSize = the same size as your layout_width
app:maxImageSize= about 10dp minus the size of your layout_width
Try
android:width="wrap_content"
android:height="wrap_content"
app:maxImageSize ="56dp"
on the fab. Worked for me