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.

Vadim Kotov
  • 7,103
  • 8
  • 44
  • 57
Raman Branavitski
  • 830
  • 1
  • 8
  • 21

1 Answers1

2

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

Xenolion
  • 9,344
  • 6
  • 25
  • 39
  • I edited the question removing the answer from the Question and post it here. All credits for the answer goes to the Asker. – Xenolion Mar 27 '19 at 20:32