Change image in Listview

jpvniekerk

Active Member
Licensed User
Longtime User
I have created a listview with an image on one side of the text. Now when I click on an item in the list and do something with it, I want to change the image for that list item only. Is there a way to do this?

I MUST use listview as the list is long (±1000 items) and fastscroll is a must - so I cannot use scrollview.

Currently I am achieving the results only by changing the relevant database item and the recreate the whole listview... But this takes time and I think it will be slow on a lower-end device. On my Samsung Galaxy II it is barely acceptable. Anything slower will be a nuisance.

So I am trying to change the image for just that one item without having to recreate the whole list.

Any help???
 
Thanks Erel,

I know scrollview can handle it, but it becomes very tedious to scroll to the bottom of the list without the fastcroll option.
 
Upvote 0
You reload it and have it look for that value and then change the picture then.
And use the ListView Position to keep the focus on that item so when it reloads its still in the same place.

I ran into the same problem and I'm using 10,000+ items. If the db is stored in the phone it works great, if its on a server, its a little slow but still works.
 
Upvote 0
Thanks Erel,

I know scrollview can handle it, but it becomes very tedious to scroll to the bottom of the list without the fastcroll option.

You can use the ScrollPanel class for fast scrolling and the CheckList class to replace your ListView by a customizable ScrollView with a lot more features (with it, replacing a bitmap in an item is fast and easy).
 
Last edited:
Upvote 0
Back
Top