How to scroll tablayout programmatically - Android

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

    I wonder if this is answer will be relevant since its coming very late. i actually achieved it in C# using Xamarin.

    tabs.GetChildAt(0).Selected = true;
     viewPager.SetCurrentItem(0, true);
    

提交回复
热议问题