Android Question Search items in CustomListview with text field

Ferdari

Active Member
Licensed User
Longtime User
Hi everyone,

I have a CustomListView + PCLV(Preoptimized CustomListView) for lazy loading, how can i use a Textfield and search for items inside the CLV, my items are CardData
Type CardData (Title As String, Creator As String, BitmapFile As String, Filename As String, Grid As grid, Pid As String) i want to search only on the Title field.

i dont know if its a simple function, but is it possible to search inside the items and show the coincident only?

if i search John, show all items containing John

I checked the Minisearch module, but i see it are itself a customview with CLV + textfield, i already have my own CLV.

Thanks!
 

Ferdari

Active Member
Licensed User
Longtime User
It is possible but it will not be simple. A much simpler solution is to use B4XDialog + B4XSearchTemplate and populate it with the text from the items. Once the user selects an item, jump to the correct card.
You are right Erel, the list fills from a JSON returned from server, the objective is to reuse the data loaded items without calling the server again(phones has enough power to do the query locally), Im thinking to search in the JSON first and re-fill the list with all the coincident items, i asked if there there were a simple find function that i coud be missing.

Thanks Erel!
 
Upvote 0
Top