I am looking at the chrisbanes/cheesesquare and I am trying to put TabLayout with a Toolbar inside a CollapsingToolbarLayout, and here is my code
All above codes are collapsing only "CollapsingtoolbarLayout" components. That means if we scroll the page of "ViewPager" content, it is not working.
I replace the "ViewPager" by "FrameLayout" now it is working, what we expecting.
I am expecting like, if scroll the page of Viewpager then "CollapsingToolbarLayout" should be listen. for this I used the "NestedScrollView". But problem is "ViewPager" not working in "NestedScrollView".
So finally I achieved with FrameLayout.
But problem is "tabLayout.setOnTabSelectedListener(new TabLayout.OnTabSelectedListener() {" is depricated
Creating The Tablayout with out ViewPager : http://www.theappguruz.com/blog/easy-way-to-create-tab-layout-in-android-without-viewpager