How can I use a custom adapter with the cwac-endless adapter?

送分小仙女□ 提交于 2019-12-13 00:11:50

问题


I want to add the endless adapter functionality to my custom adapter. How can I use this combination? Thank you.


回答1:


You follow the instructions in the GitHub repo for the project.

EndlessAdapter is a wrapper around your custom adapter.

So, first, you get your custom adapter working correctly on its own. Then, you create your EndlessAdapter subclass (with your implementation of cacheInBackground(), etc.), wrap your custom adapter in an instance of your EndlessAdapter subclass, and put your instance of your EndlessAdapter subclass in your ListView.

The demo/ sub-project contains some sample activities. They happen to wrap an ArrayAdapter. They could just as easily wrap a DineshSuperAwesomeAdapter.



来源:https://stackoverflow.com/questions/9650129/how-can-i-use-a-custom-adapter-with-the-cwac-endless-adapter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!