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
- Don't use
CoordinatorLayout
- Place
TabLayout
andRecyclerView
withinFrameLayout
, so thatTabLayout
will overlay on the top ofRecyclerView
- Add top padding on
RecyclerView
. Havingandroid:clipToPadding="false"
is important as well. - To hide/ show
TabLayout
during scrolling, attach HidingScrollListener toRecyclerView
.
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"