NestedScrollView inside ViewPager inside NestedScrollView: Innermost NestedScrollView not scrolling

So, I have a snippet that uses CoordinatorLayout with the NestedScrollView backend. Inside NestedScrollView there is a ViewPager. Each element of this ViewPager is a Layout coordinator with the NestedScrollView internal interface.

The behavior I want is that when each item in the ViewPager scrolls up and down, my custom BottomBar disappears and reappears.

However, when I scroll up and down, the BottomBar disappears and reappears, but the content in the internal ScrollView does not move. This is problem

The code below can help with any advice.

Things I tried:

  • Calling ViewCompat.setNestedScrollingEnabled () for almost every view in the hierarchy that can scroll.
  • Calling a requestDisallowInterceptTouchEvent (true) on an external NestedScrollView.

Primary activity: enter image description here

Snippet with external NestedScrollView: enter image description here

Each item in the ViewPager: enter image description here

+4
source share
1 answer

Application: layout_behavior = "@ string / appbar_scrolling_view_behavior"

set this line in ViewPager, it will help you

-1
source

All Articles