开发者

android: how can a edit a row in a listview?

Greeting everyone. I've just made a listview and now I want to edit each row to add different pictures. As the images are all form the Internet, I want to add them 开发者_StackOverflowby myself.Can anyone tell me how to get a row for the listview?


You need to create your own list adapter. If you're going to be loading images from the web, I suggest you do what's called "lazy loading", which is where you download the images as you need them. They're displayed in the list as soon as they've been downloaded but the user can still scroll up and down the list. Checkout this example for more details. It shows you how to put images in your list and how to lazily load them.


Implement listview using adapter and in the getview method of the adpter , you can get each row of the list and edit the content of the row.

Here is a link for a tutorial where it is well explained.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜