How to scroll tablayout programmatically - Android

前端 未结 13 2162
终归单人心
终归单人心 2021-02-07 00:31

I have created 30 scrollable tabs using tablayout.

So first three tabs are visible on screen and rest of them are invisible which can be scroll using swipe gesture.

13条回答
  •  夕颜
    夕颜 (楼主)
    2021-02-07 00:36

    To select the last tab, use tabLayout.getTabAt(X).select(); where X is the last tab index

提交回复
热议问题