我想要一个有 5 个标签的 viewpager。最大限度。3 应该一次可见,具有相同的宽度,并且应该将所选选项卡居中。这就像 Fotmob 的应用程序屏幕。
布局将是这样的:
Yesterday | Live| Today | Tomorrow | Day after Tomorrow
我怎样才能做到这一点XLPagerTabStrip
?
设置buttonBarLeftContentInset
并buttonBarRightContentInset
输入settings.style
一个高值,这将使所选项目居中。
settings.style.buttonBarLeftContentInset = 9999
settings.style.buttonBarRightContentInset = 9999
遗憾的是,没有简单的方法可以使用XLPagerTabStrip
. 您可以尝试为settings.style.buttonBarMinimumInteritemSpacing
.
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句