I need to create an interface like Google Newsstand which is a sort of ViewPager (horizontal scroll) over a collapsing header (vertical scroll). One of my requirements is to
Instead of placing ViewPager inside the NestedScrollView, do it the other way around.
Place the NestedScrollView in the child Views inside the ViewPager which in essence is the Fragment's layout. It's also very likely that you won't even need to use NestedScrollView if your Fragment's list layout is very simple.
Example Layouts
Activity's Layout:
If you don't need the TabLayout, you can ditch the LinearLayout and make ViewPager standalone. But be sure to use app:layout_behavior="@string/appbar_scrolling_view_behavior" in ViewPager attributes.
Simple Fragment's Layout:
Complex Fragment's Layout:
Example App: CollapsingToolbarPoc