How to scroll tablayout programmatically - Android

前端 未结 13 2180
终归单人心
终归单人心 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:53

    new Handler().postDelayed(
        new Runnable() {
            @Override public void run() {
                mTabLayout.getTabAt(TAB_NUMBER).select();
            }
        }, 100);
    

提交回复
热议问题