gpt4 book ai didi

java - 可滚动的 PagerTabStrip

转载 作者:行者123 更新时间:2023-11-30 03:27:52 27 4
gpt4 key购买 nike

我已经搜索这个主题一段时间了,但找不到足够的资源或有关滚动 PagerTabStrip 的内容。我正在使用 FragmentStatePagerAdapter 并使用 getPageTitle(int position) 填充 PagerTabStrip。我想知道如何使 titles 可滚动。我想在停止或选择特定标题时滚动标题而不影响 View ,这就是 View 更新的时间。我一直在考虑使用 Horizo​​ntialListView 但不确定如何开始。希望向你学习。谢谢。

在文档上找到这个:

PagerTabStrip is an interactive indicator of the current, next, and previous pages of a ViewPager. It is intended to be used as a child view of a ViewPager widget in your XML layout. Add it as a child of a ViewPager in your layout file and set its android:layout_gravity to TOP or BOTTOM to pin it to the top or bottom of the ViewPager. The title from each page is supplied by the method getPageTitle(int) in the adapter supplied to the ViewPager.

最佳答案

我一直在网上搜索这个,但我没有得到任何相关资源。我刚刚发现了另一个名为 actionsherlock 的库,它可以在不影响 View 的情况下滚动选项卡,这正是我所需要的,而不是使用 PagerTabStrip 的监听器。

关于java - 可滚动的 PagerTabStrip,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17944681/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com