Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何创建2 向无限ViewPager?在现有的元素中,元素的位置可以>= 0,但不能< 0。
viewpager 有一个适配器。适配器有一个 getView 方法。在 getView 中,使用“位置”以列表中元素的数量为模。让 getCount 返回一个高数字,并在范围中间的某个位置启动 viewpager。它不是无限的,而是几乎无限的。