Skip to content Skip to sidebar Skip to footer

How To Fix Footer Properly Which Is Inside Coordinatorlayout

I tend to further elaborate from this Android - footer scrolls off screen when used in CoordinatorLayout and https://code.google.com/p/android/issues/detail?id=177195 I wish to hid

Solution 1:

I was able to achieve what I want, by following tutorial at

https://mzgreen.github.io/2015/02/15/How-to-hideshow-Toolbar-when-list-is-scroling%28part1%29/

http://mzgreen.github.io/2015/02/28/How-to-hideshow-Toolbar-when-list-is-scrolling%28part2%29/

The key ideas are

  1. Don't use CoordinatorLayout
  2. Place TabLayout and RecyclerView within FrameLayout, so that TabLayout will overlay on the top of RecyclerView
  3. Add top padding on RecyclerView. Having android:clipToPadding="false" is important as well.
  4. To hide/ show TabLayout during scrolling, attach HidingScrollListener to RecyclerView.

The shortcoming for this solution is that, requiresFadingEdge will no longer work on RecyclerView, due to the top padding.

Post a Comment for "How To Fix Footer Properly Which Is Inside Coordinatorlayout"