title: How to make tab not scrollable in TabLayout when I click from one tab to another
body: <p>I successfully stopped scroll in ViewPager when you swipe from one tab fragment to another in ViewPager now I can't figure out how to do the same for Tab Bar.  Currently if you click between one tab to another, the tabs scroll from tab to tab. I want to make it stop scroll and work more like in Facebook Messenger when you click between tabs.</p>
  
  <p>I created a CustomViewPager to stop ViewPager tab scroll:</p>
  
  <p><a href="https://i.stack.imgur.com/jcu0j.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/jcu0j.png" alt="enter image description here"></a></p>
  
  <p>in XML file I have: </p>
  
  <pre><code>    &lt;com.example.myname.tabbar.CustomViewPager/&gt;
  </code></pre>
  
  <p>I tried to create several different superclasses for CustomTabBar but nothing works. I used ViewPager, TabLayout.tab, PagerTabStrip, ViewPager, ViewPagerOnTabSelectedListener, CustomViewPager and none of these work. I've tried various code I've looked up on StackOverflow and nothing works. </p>
  
  <p>How to disable scroll between fragments when tab fragment is clicked on in TabLayout?</p>