I want to add the endless adapter functionality to my custom adapter. How can I use this combination? Thank you.
Asked
Active
Viewed 2,265 times
1
-
1Just in case anyone gets here like I did, looking for a good example. I found this one http://droidista.blogspot.co.il/2011/04/using-cwacs-endlessadapter-with-custom.html - worked well! You can replace the ArrayAdapter to BaseAdapter easily. – Lior Iluz Jun 03 '12 at 14:55
1 Answers
7
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
.

CommonsWare
- 986,068
- 189
- 2,389
- 2,491