问题
I am using scrollable TabLayout with a ViewPager.
I want to make sure that at any given time I have 7 tabs displayed per page. Even if the total number of tabs is 10, I want to have 7 per page, and scroll to expose the other 3.
I can't find a property to control the number of tabs displayed.
回答1:
Eventually what worked for me was to calculate the desired size of each cell to get the total amount of tabs that I needed per page and set app:tabMaxWidth
inside android.support.design.widget.TabLayout
来源:https://stackoverflow.com/questions/57179855/fixed-number-of-tabs-per-page-in-tablayout