title: How to scroll and hide tablayout to top on android
body: <p>How to scroll and hide tablayout to top on android like the
  <a href="https://i.stack.imgur.com/rl7mD.png" rel="nofollow noreferrer">example</a>. I have been searching for two weeks but don't have any solution.</p>
  <p>Thanks in advance.</p>
  <pre><code>&lt;com.google.android.material.tabs.TabLayout
      android:id=&quot;@+id/tabLayout&quot;
      android:layout_width=&quot;match_parent&quot;
      android:layout_height=&quot;36dp&quot;
      android:layout_marginTop=&quot;6dp&quot;
      app:tabTextAppearance=&quot;@style/tabTextAppearance&quot;
      app:layout_scrollFlags=&quot;scroll|enterAlways&quot;
      app:tabIndicatorColor=&quot;@color/color_whatsapp&quot;
      app:tabSelectedTextColor=&quot;@color/color_whatsapp&quot;
      app:tabTextColor=&quot;@color/color_concrete&quot;
      app:layout_constraintTop_toBottomOf=&quot;@id/cmdBack&quot;
      app:layout_constraintStart_toStartOf=&quot;parent&quot;/&gt;
  </code></pre>