RecyclerView inside ScrollView, some items are not shown
I found the solution myself: replace ScrollView
with NestedScrollView
and keep recyclerView.setNestedScrollingEnabled(false)
. I don't know if this is what NestedScrollView
is made for but it works.
NOTICE:
NestedScrollView
is not a child ofScrollView
but ofFrameLayout
.- This solution will also bring some bugs with self-simulated
adjustResize
.
In my case, I replaced LineaLayout with RelativeLayout and it's solved the issue and all items have shown.