Moving Floating Action Button up and down to avoid getting blocked by a snackbar

To anyone looking out for answer in future.. Coordinator Layout used as Parent Layout of Floating Action Button will handle the animation effect for you automatically. The floating action button has a default behavior that detects Snackbar views being added and animates the button above the height of the Snackbar accordingly. Floating Action Button Behavior … Read more

Using Google Design Library how to hide FAB button on Scroll down?

If you’re using RecyclerView and you’re looking for something simple, you can try this: recyclerView.addOnScrollListener(new RecyclerView.OnScrollListener(){ @Override public void onScrolled(RecyclerView recyclerView, int dx, int dy){ if (dy > 0) fabAddNew.hide(); else if (dy < 0) fabAddNew.show(); } }); By replacing 0 with a constant, you can adjust the sensitivity of triggering, providing smoother experience

Floating Action Button not showing fully inside a fragment

It’s not an acceptable solution to have to show/hide the FAB whatever tab is selected. I’ve tried every layout combination, but moving the FAB to the activity layout was the only solution that worked. But what if you need the button only in one tab? It’s the only way that works now, but I’m expecting … Read more

Bottom Align Floating Action Button

For RelativeLayout: <com.google.android.material.floatingactionbutton.FloatingActionButton android:id=”@+id/fab” android:layout_alignParentBottom=”true” android:layout_alignParentRight=”true” … /> For CoordinatorLayout, you should use android:layout_gravity=”end|bottom” For ConstraintLayout: <com.google.android.material.floatingactionbutton.FloatingActionButton android:id=”@+id/fab” app:layout_constraintBottom_toBottomOf=”parent” app:layout_constraintEnd_toEndOf=”parent” … /> See this answer for more information.