EDIT
I solved this problem by using CoordinatorLayout
and a AppBarLayout
as a wrapper for the header and TabLayout
. Should have been pretty obvious but oh well.
ORIGINAL QUESTION: I have a design that I have tried multiple iterations to accomplish for my application. I know that nesting scrollable views is not to prefer but i believe is doable, I cant really find the answer I am looking for my specific problem so here goes.
Here is a simple mockup of the design and how I imagine how I would implement it:
This is some kind of profile-design where at the top there is some textviews, banner, avatar and jadajada. Below is three tabs which are used to switch the content below them.
The content for each tabs are of the same kind object, they just have their own "filter"
The implementation below is pretty straight forward at start.
We use a recyclerview
Inside that we have some different viewholders where one of them contains a viewpager.
The viewpager contains of fragments that in them contains another recyclerview.
I have found a lot of problems by doing this way. And haven't really accomplished so that everything feels like one single scrollview.
I have also tried using one single recyclerview for everything but the animation between tabs isn't really what we are looking for, also it was a real inconsistency mess.
I think my real question here is am I putting water over my head, should i approach this a different way? Has anyone else done this in an elegant way?