Package 

Class SlidingTabLayoutMediator

    • Method Detail

      • attach

         void attach()

        Link the TabLayout and the ViewPager2 together. Must be called after ViewPager2 has an adapterset. To be called on a new instance of TabLayoutMediator or if the ViewPager2's adapterchanges.

      • detach

         void detach()

        Unlink the TabLayout and the ViewPager. To be called on a stale TabLayoutMediator if a new oneis instantiated, to prevent holding on to a view that should be garbage collected. Also to becalled before attach when a ViewPager2's adapter is changed.