title: How to sync TabLayout with Recyclerview?
body: <p>I have a <code>TabLayout</code> with <code>Recyclerview</code> so that when tabs are clicked then the <code>Recyclerview</code> is scrolled to a particular position.
  I want the reverse procedure as well such that when the <code>Recyclerview</code> is scrolled to a particular position then the particular tab is highlighted.</p>
  <p>For example: If there are 4 tabs in the <code>TabLayout</code> and when <code>Recyclerview</code> is scrolled to 5th position (item visible and below <code>TabLayout</code>) then 3rd tab should be highlighted.</p>
  <p><a href="https://i.stack.imgur.com/NpAIs.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/NpAIs.png" alt="enter image description here" /></a></p>
  <p>Here when 'How it works' appears below <code>TabLayout</code> then tabs 'How it works' should be highlighted.</p>