Yuhao_Zhu
Yuhao_Zhu

Reputation: 161

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 by myself.Can anyone tell me how to get a row for the listview?

Upvotes: 2

Views: 1581

Answers (2)

Kurtis Nusbaum
Kurtis Nusbaum

Reputation: 30825

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.

Upvotes: 2

png
png

Reputation: 4408

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.

Upvotes: 0

Related Questions