The TabLayoutMediator makes it possible for a ViewPager2 to be linked to
a TabLayout similarly to how a ViewPager was linked to TabLayout.
PiperOrigin-RevId: 239207045
Makes the following methods public:
- setScrollPosition(int, float, boolean, boolean)
- selectTab(Tab)
- selectTab(Tab, boolean)
This makes it possible to separate the link between a TabLayout and a ViewPager to another class.
PiperOrigin-RevId: 228887919
Essentially, the issue is that when "selected" tabs were added to a TabLayout, we were calling tab.select() which updated the state of the selected tab to selected, and sets all other tabs to unselected. HOWEVER, when an "unselected" tab is added, we never call tab.select(), so the unselected tab's state never gets updated until a tab is clicked manually. The default state of tabs is "selected", so unselected tabs appeared selected.
PiperOrigin-RevId: 209622793