mirror of
https://github.com/material-components/material-components-android.git
synced 2026-01-19 19:41:35 +08:00
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