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.
To select the last tab, use tabLayout.getTabAt(X).select(); where X is the last tab index