Closed mathieudebrito closed 9 years ago
@mathieudebrito Currently the FloatingActionButtonLayout doesn't support using gravity, it just puts it in the bottom right corner. Since it's rather useful I'll add support for gravity as soon as I can. I'm studying for a test right now so you might have to wait till the end of next week at the latest.
Sure ! no pb. In the meanwhile, here is my workaround :
I just put the FAB in a RelativeLayout, and it works almost like a charm :p
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<!-- FLOATING ACTION BUTTON -->
<com.melnykov.fab.FloatingActionButton
android:id="@+id/fab"
android:layout_width="48dp"
android:layout_height="48dp"
android:layout_centerInParents="true"
android:layout_marginBottom="25dp"
android:layout_marginRight="50dp"
android:scaleType="fitCenter"
android:src="@drawable/ic_navigation"
android:tint="@color/geovelo_blue"
auto:fab_colorNormal="@color/common_white"
auto:fab_colorPressed="@color/common_white"
auto:fab_colorRipple="@color/geovelo_blue_disabled" />
</RelativeLayout>
Best wishes for your test !
@mathieudebrito Thanks :)
@mathieudebrito This issue has been fixed in the latest release. You'll just have to change the version number in your build.gradle
from 3.1.0
to 3.1.1
. Thanks for reporting the issue and enjoy :)
Perfect thx :) Hope you rocked your test !
Hi, (first of, thx for this fork, it's really awesome !)
I tried to set layout_gravity to the fab and it doesn't work. the position is alway
bottom|right
. I tried withbottom|center
,bottom|left
andbottom|center_horizontal
but nothing changes. Any idea please ?here is my code: