Reputation: 599
How do I implement a listview which displays images an text dynamically from the web? Each image has some descriptions to it and I need them to display correctly in each list. The images change every once in a while. So I have to retrieve up to date contents.
I have read this, but have no idea how to include text into it. Any help here?
Thanks.
Upvotes: 1
Views: 16384
Reputation: 18746
Here you will find full details and along with Full working Source code
Android lazy image loader example
Upvotes: 2
Reputation: 5407
Use an ListView Adapter like here: http://android.amberfog.com/?p=296.
The getView
Method is executed for every row of your ListView, so you have to place your code to load the images right there
When the Data changes simply call notifyDataSetChanged
on the ListView Adapter and the ListView will refresh (executs getView
again).
Upvotes: 0