Android:ListView,最后一项 – 显示更多

前端之家收集整理的这篇文章主要介绍了Android:ListView,最后一项 – 显示更多前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一个问题,我想在列表中显示20个项目.
但有一个问题:如果用户向下滚动到列表的底部,则会有一个项目显示:“显示更多项目”,当用户点击它时,更多项目将添加到列表中.

我的问题是如何有一个最后一个项目,有不同的风格和看起来不同的东西是多么可能:并做不同的事情,(我认为这在QuickSearchBox中使用)

解决方法

我建议你 commonswarecwac-endless.

cwac-endless: Provides the EndlessAdapter,a wrapper for an existing ListAdapter that adds “endless list” capability. When the user scrolls to the bottom of the list,if there is more data for this list to be retrieved,your code gets invoked in a background thread to fetch the new rows,which then get seamlessly attached to the bottom of the list.

原文链接:https://www.f2er.com/android/309261.html

猜你在找的Android相关文章