如何向适配器添加附加列表
我有一个带有单独标题的 ListView。例如......“今天事件”是标题,其下方有列表。“明天事件”是标题,其下方有一些列表。这两个适配器位于单个 Listview 中。我的问题is,in 每个适配器都有超过 20 个项目,但它应该显示 20 个项目,当列表滚动到第 20 个项目时,应该显示剩余的列表。我该如何解决这个问题。
感谢副词。
I have a ListView with separate headers.like.."Today events" is header and below of that it has list."Tomorrow events" is header and below of that it has some list.These two adapters in a single Listview.My problem is,in Each adapter have more than 20 items but it should display 20 items and when list scroll to 20 th item the remaining list should be displayed. How can i solve this.
Thanks in adv.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您应该查看 CommonsWare 的
EndlessAdapter
,或者在此 < a href="http://benjii.me/2010/08/endless-scrolling-listview-in-android/" rel="nofollow noreferrer">Android 中的无限滚动 ListView。另外,stackoverflow 上已经有几个类似的问题,因此您可以在提出问题之前进行搜索:
You should take a look at CommonsWare's
EndlessAdapter
, or at this Endless Scrolling ListView in Android.Also, there have been several similar questions already on stackoverflow, so you could do a search prior to asking the question: