FloatingActionButton
FloatingActionButton copied to clipboard
FAB is square on Android 4.4.2
Hello,
I don't know why but on Android 4.4.2 the floating action button is square. It also doesn't behave as it should. (i.e. it doesn't show/hide based on the scrolling of the listview) I've attached a photo for you to see. Does anyone know if this is a bug or am I doing something wrong?
Thanks!
me too.. mine is on 4.4.4
<com.melnykov.fab.FloatingActionButton
android:id="@+id/full_menu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginBottom="16dp"
android:layout_marginRight="16dp"
android:src="@drawable/car"
fab:fab_colorNormal="@color/yellow_400"
fab:fab_colorPressed="@color/indigo_300"
fab:fab_colorRipple="@color/indigo_200"
fab:fab_type="normal" />
ok I got this. This component is a ImageButton form the soruce. So you need to add this in order to make the size right
android:scaleType="centerInside"
that didn't fix it for me. :( still a big square.
@tudorsirbu you have to use 24dp drawables, at least that's what fixed the issue in my case
@tudorsirbu Using setBackgroundColor() made my fab to turn to a square button. it might be fixed if you use the other methods to set the background.