title: How to create a layout like Twitter profile page in Android
body: <p>I am developping an app that has a page where there must be a header followed by multiple recycler views within a viewpager. However, I do not know how to "hide" the header when scrolling down.</p>
  
  <p>The following layout would not work :</p>
  
  <pre><code>- RecyclerView
      - Header
      - SlidingTabLayout
      - ViewPager
          - RecyclerView
  </code></pre>
  
  <p>Because a verticaly scrollable view cannot be put inside another verticaly scollable view. But it is possible to create this type of layout in another way because twitter did it :</p>
  
  <p><a href="https://i.stack.imgur.com/y1C0E.png" rel="noreferrer"><img src="https://i.stack.imgur.com/y1C0E.png" alt="enter image description here"></a></p>
  
  <p>So how does one achieve to create this type of layout?</p>
  
  <p><em>Theorical solution suggestion</em></p>
  
  <p>If we had this layout :</p>
  
  <pre><code>- LinearLayout
      - Header
      - SlidingTabLayout
      - ViewPager
          - RecyclerView
  </code></pre>
  
  <p>And when the RecyclerView is scrolled, we would move manually every element upwards so the Header would progressively be "hidden" and the ViewPager would be higher, could it work?</p>