0

我注意到最近有一些应用程序使用了一种选项卡效果,但这不是我认为的“普通”选项卡控件。“标签”不是很高,一次只能在屏幕上显示 3 个。向左或向右滚动屏幕会显示另一个选项卡,而一个选项卡会消失(难以描述)。

我在 BBC iPlayer Radio 应用程序和 TuneIn 应用程序上看到了它。

下图显示了我在这两个应用程序上的意思(尽管不是滑动位)。

http://i42.tinypic.com/28buosy.png

他们是怎么做到的?

4

2 回答 2

2

这是ViewPagerIndicator. 它不是原生提供的,但是有一个库:https ://github.com/JakeWharton/Android-ViewPagerIndicator

它们与:http ViewPager: //developer.android.com/reference/android/support/v4/view/ViewPager.html一起使用

于 2013-06-08T19:14:51.300 回答
1

另一种选择是 Pager Sliding TabStrip:

https://github.com/astuetz/PagerSlidingTabStrip

Play 商店中还有一个示例应用程序:https: //play.google.com/store/apps/details?id=com.astuetz.viewpager.extensions.sample

于 2013-07-14T16:32:37.297 回答