set Scroll Position
Set the scroll position of the TabLayout.
Parameters
Position of the tab to scroll.
Value from [0, 1) indicating the offset from position
.
Whether to draw the tab at the specified position + positionOffset as selected.
Note that calling the method with updateSelectedTabView = true
does not select a tab at the specified position, but only draws it as selected. This can be useful for when the TabLayout behavior needs to be linked to another view, such as androidx.viewpager.widget.ViewPager.
See also
Set the scroll position of the TabLayout.
Parameters
Position of the tab to scroll.
Value from [0, 1) indicating the offset from position
.
Whether to draw the tab at the specified position + positionOffset as selected.
Note that calling the method with updateSelectedTabView = true
does not select a tab at the specified position, but only draws it as selected. This can be useful for when the TabLayout behavior needs to be linked to another view, such as androidx.viewpager.widget.ViewPager.
Whether to set the indicator to the specified position and offset.
Note that calling the method with updateIndicatorPosition = true
does not select a tab at the specified position, but only updates the indicator position. This can be useful for when the TabLayout behavior needs to be linked to another view, such as androidx.viewpager.widget.ViewPager.