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 1

    There are two options:

    1. Push both RecyclerView into a vertical ScrollView and set the vertical RecyclerView height to wrap_content . But this is a bad option if there are many elements in the vertical RecyclerView , for they will all be constantly present in the markup, and not created / deleted as you scroll.
    2. Make horizontal RecyclerView first 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.