Keeping the FAB Button at right bottom side
I put every fragment with their own FAB Button. I found that is always placed under the last element of that layout. It won't be pushed further bottom, at the right bottom of the screen. I used to use the LinearLayout and RelativeLayout, they won't work too.
FInally, I found android.support.design.widget.CoordinatorLayout is only way to work, I don't know why yet, I found this solution by trial and error
Code
<android.support.design.widget.CoordinatorLayout | |
android:id="@+id/rootLayout" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<android.support.design.widget.FloatingActionButton android:id="@+id/fab" | |
android:layout_width="wrap_content" android:layout_height="wrap_content" | |
android:layout_gravity="bottom|end" android:layout_margin="@dimen/fab_margin" | |
android:src="@android:drawable/ic_input_add" /> | |
</android.support.design.widget.CoordinatorLayout> |
Trackback address for this post
Trackback URL (right click and copy shortcut/link location)
Feedback awaiting moderation
This post has 1084 feedbacks awaiting moderation...
Form is loading...