Toolbar not reset with nested RecyclerView

I made a collapsible toolbar on Activity, but there is one problem.

The screen contains a RecyclerView, which has several layout elements, and one of them is another RecyclerView with horizontal scrolling. When the main repeater scrolls, the toolbar does not expand or collapse when scrolling starts with a nested recycler, but in other views it works as it should.

To make it easier to understand: when I first touch the screen in the position where there is a nested RecyclerView and try to scroll up and down, the toolbar does not collapse or expand.

Any idea what might cause this problem and how to fix it?

+5
source share
1 answer

I needed to set recyclerView.setNestedScrollingEnabled(false) for the nested RecyclerView to work.

Thanks to Reddit for the user in this thread: The toolbar does not collapse with the nested RecyclerView

+13
source

Source: https://habr.com/ru/post/1235601/


All Articles