I think the listview is missing a listview.setitem property. It would be very useful to have this. The idea would be to change the text, image or second label text of a given item in the list.
It could be something like that: listview.item(34).settext
I know that it can be done using the CustomListview but it seems that the custom listview is limited by the number of items (1000-2000).
I'm surprised noone replied to this thread. It seems like something that everyone would need when working with a listview. At the moment because this feature is missing, when I need to update a single element il a list of 25000 items, I have to clear and refill the listview!
There is no settext method in the underlying Android class see here Android Developers Documentation. I guess it's a trade off for the speed of retrieval and memory management to allow large lists to be contained in one object.
There is no settext method in the underlying Android class see here Android Developers Documentation. I guess it's a trade off for the speed of retrieval and memory management to allow large lists to be contained in one object.
I see.... That's a pity then. It seems like a very basic feature missing. I guess I'll have to find another method. I was thinking that the gmail app was using a listview to display the emails but the must be using a scrollview then.
I don't know what GMail uses, there are various options on the forums if you want to try them, although I regularly use a list view with about 2000 items with a fliter, sort and drag 'n' drop (on a subset) and there is no discernible lag when it's updating, it's very slick.
I see.... That's a pity then. It seems like a very basic feature missing. I guess I'll have to find another method. I was thinking that the gmail app was using a listview to display the emails but the must be using a scrollview then.
The ListView can take many forms. The B4A ListView is one of them. The missing function is a choice, and has nothing to do with performance or memory. A Java developper may add a function to edit items if he needs one.
So can a B4A programmer, would a java implementation be any more efficient?
The ListView class relies on a ListAdapter, the process would presumably have to change the data wrapped with the ListAdapter then rebuild the ListView as we do currently in B4A. It would just be hidden behind a Java Wrapper.