FloatingActionButton icon indicating copy to clipboard operation
FloatingActionButton copied to clipboard

FAB is square on Android 4.4.2

Open tudorsirbu opened this issue 9 years ago • 5 comments

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! screenshot_2015-03-09-11-33-53 png

tudorsirbu avatar Mar 09 '15 11:03 tudorsirbu

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" />

jjhesk avatar Mar 15 '15 16:03 jjhesk

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"

jjhesk avatar Mar 15 '15 16:03 jjhesk

that didn't fix it for me. :( still a big square.

tudorsirbu avatar Mar 18 '15 10:03 tudorsirbu

@tudorsirbu you have to use 24dp drawables, at least that's what fixed the issue in my case

rahuliyer95 avatar Mar 18 '15 10:03 rahuliyer95

@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.

MahendraRaj avatar Feb 10 '17 19:02 MahendraRaj