Android Question Show/hide a list item on CustomListView with Lazy loading

toby

Well-Known Member
Licensed User
Longtime User
I'm wondering if there is an easy way to show or hide, on the fly, a whole list item, the panel and all child views, on a customListView. Different inputs show different items as user types.

For example, the whole list ( 7 list items in all) is "monday", "tuesday", "wednesday", "thursday", "friday", "saturday", "sunday",

For a list of weekdays containing "t", the list should show: "tuesday", "thursday", "saturday", with 4 items hidden
For a list of weekdays containing "tu", the list should be: "tuesday" and "saturday", with 5 item hidden


Any idea or advice is welcome.
 

udg

Expert
Licensed User
Longtime User
You can also call ResizeItem and make them zero sized.
This sounds a very good suggestion for your goal. You have a searchtext edit box, read the TextChanged event, then go through the xclv setting panel sizes to zero or "standard" depending on the check against the current filter.

Edit: this could be of inspiration too
 
Last edited:
Upvote 0

toby

Well-Known Member
Licensed User
Longtime User
Thanks to the power of b4x and your valuable helps, implementing the feature is much easier than I originally thought. Attached is a working sample.
 

Attachments

  • customlistview.zip
    12.8 KB · Views: 156
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…