in the fragment there are horizontal and vertical recyclewVIew. For each of them has its own adapter. When scrolling downward, only the vertical recycler scrolls down, while it is horizontal, as it stood on top, so it stands. How to make scrolling up and down scroll the entire fragment, and not just one recycler?
1 answer
There are two options:
- Push both
RecyclerViewinto a verticalScrollViewand set the verticalRecyclerViewheight towrap_content. But this is a bad option if there are many elements in the verticalRecyclerView, for they will all be constantly present in the markup, and not created / deleted as you scroll. - Make horizontal
RecyclerViewfirst element of the vertical. This option is the most correct, but it may be a little more difficult to implement. Although nothing much complicated here.
|