Collapsing toolbar layout doesn't work when using horizontal recycler view inside nested scroll view
W

1

7

I have some problems with Collapsing Toolbar. I have following layout structure

<CoordinatorLayout>
    <AppbarLayout>
        <CollapsingToolbar>
    <NestedScrollView>
        <HorizontalRecyclerView>
    </NestedScrollView>
</CoordinatorLayout>

The problem occurs only when I'am trying to scroll my NestedScrollView touching the HorizontalRecyclerView. In that case CollapsingToolbar doesn't collaps. Just AppbarLayout stay on it's place and NestedScrollView scroll under it. I've attached a video, where everything is clear. Can anyone explain the problem? Thanks.

Wrongdoing answered 6/3, 2018 at 9:33 Comment(0)
N
3

The problem can be solved by adding setNestedScrollingEnabled(false) to inner HorizontalRecyclerView.

Nakasuji answered 27/3, 2019 at 20:29 Comment(1)
I edited the question removing the answer from the Question and post it here. All credits for the answer goes to the Asker.Nakasuji

© 2022 - 2024 — McMap. All rights reserved.