【问题标题】:PagerTabStrip Show tabs in single pagePagerTabStrip 在单页中显示选项卡
【发布时间】:2018-01-19 14:27:22
【问题描述】:

我使用 PageViewerPagerTabStrip 在 Xamarin.Android 中通过选项卡在屏幕上滑动。但它每页显示一个标签。我想在一个页面上显示所有 5 个标签。

Android PagerTabStrip tabs alignment to left 已经对此进行了解释,但我希望在 Xamarin.Android 中使用它。

【问题讨论】:

  • 你试过DistributeEvenlyPagerTabStrip上的属性了吗?

标签: c# android xamarin xamarin.android


【解决方案1】:

您需要SlidingTabLayout 类和SlidingTabStrip 类。您发布的链接,它们是java代码,您只需将它们更改为c#代码即可解决您的问题。 here is a vedio baout SlidingTabLayouthere is a demo which contains the classes,只需将其复制到您的项目并在您的布局中引用即可。

【讨论】:

  • Lv MSFT 我想在页面中添加按钮,如果我点击该按钮,它应该会指定 pagerView。你能帮忙
猜你喜欢
  • 1970-01-01
  • 2015-02-19
  • 2015-10-08
  • 1970-01-01
  • 1970-01-01
  • 1970-01-01
  • 2020-04-20
  • 2013-12-19
  • 1970-01-01
相关资源
最近更新 更多