Closed bogdanzurac closed 7 years ago
I believe Bottom Sheets by default, and this library doesn't change this, only support one scrollable child at a time. And when I look at your activity_main.xml
I see a RecyclerView just above the ViewPager which is probably picked up as scrolling child before the ViewPager is even considered. I would guess that moving the ViewPager up in the hierarchy would change that but then of course you would lose nested scrolling on the RecyclerView. Is simplifying your screen design an option?
I can confirm that moving the ViewPager above the RecyclerView enables nested scrolling. Really nice catch, thanks a lot for pointing that out! In my case, I didn't need nested scrolling on the RecyclerView, since it has a horizontal layout manager.
Closing this, since the library works as intended. For anybody reading this, just remember to place the View that requires nested scrolling as the first element.
I'm trying to get this library working with a ViewPager inside a LinearLayout with BottomSheetBehavior, which contains fragments with a NestedScrollView inside a RelativeLayout. Layouts are below. Everything works as expected, apart from the actual nested scrolling. Is there something that I'm missing? At first I thought the additional OnPageChangedListener was the issue, but even after removing it, it still didn't work.
layout/activity_main.xml
layout/fragment_nested.xml
java/MainActivity.java