Android无限循环ListView?
我想做一个循环ListView。这意味着,它的行为有点像 iO 上的选择器小部件,因此当用户向上或向下滚动时,列表只会不断循环其内容。我猜想需要为此编写一些奇特的自定义适配器,但我不确定是否可能。
Afaik,ListView 需要提前知道适配器中包含的元素数量。例如,在这种情况下这将是一个问题。
您对这个问题有什么建议吗?
谢谢
I'd like to make a looping ListView. That means, it behaves a bit like the picker widget on iOs, so when the user scrolls either up or down, the list just keeps looping its contents. I'd guess that one needs to write some fancy custom adapter for this, but I'm not sure if it's possible.
Afaik, the ListView needs to know the number of elements containted in the adapter in advance. That would be a problem in this case, for example.
Do you have any tips on this matter?
Thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
你的意思是循环ListView吗?过去曾提出过类似的问题。
Do you mean a circular ListView? A similar question has been asked in the past.