我如何使用与CWAC,无尽的适配器自定义适配器? [英] How can I use a custom adapter with the cwac-endless adapter?
问题描述
我想无尽的适配功能添加到我的自定义适配器。我如何使用这个组合?谢谢你。
I want to add the endless adapter functionality to my custom adapter. How can I use this combination? Thank you.
推荐答案
您遵循 GitHub库的说明项目一>
EndlessAdapter
是在你的自定义适配器的包装。
EndlessAdapter
is a wrapper around your custom adapter.
所以,的第一个的,你得到你的自定义适配器自身的正常工作。然后,您创建 EndlessAdapter
子类(与实施的cacheInBackground()
等),包住您的自定义适配器在你的 EndlessAdapter
子类的实例,并把你的 EndlessAdapter
子类的实例,在你的的ListView
。
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
.
的演示
/子项目包含了一些样品的活动。他们的发生的换行的 ArrayAdapter
。他们可以很容易地裹 DineshSuperAwesomeAdapter
。
The demo
/ sub-project contains some sample activities. They happen to wrap an ArrayAdapter
. They could just as easily wrap a DineshSuperAwesomeAdapter
.
这篇关于我如何使用与CWAC,无尽的适配器自定义适配器?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!