B4A Library [Class] SearchView - More powerful alternative to AutoCompleteEditText

Status
Not open for further replies.

shashkiranr

Active Member
Licensed User
Hi Erel,

im using this search view with Ultimate List View. The problem i am facing is when i set the index for the list, the ULV is not loading properly since the time taken to set the index is more. i tried to create a service and do the indexing in the background not able to pass the output back to the calling Class Module.

Kindly let me know how i can use the Indexing of the searchview in a service.

Regards,
SK
 

Erel

Administrator
Staff member
Licensed User
Moving the code to a service will not help. Services code run in the same thread as any other code.

If the data is static then you can store the index in a file and then load it instead of building it.
 

anallie0

Active Member
Licensed User
hi Erel
I'm using your example but I have a problem.
If I insert it in a black panel, there are no display problems.
But if I insert it in a white panel, the imputbox is not visible.
how can I make it black ?
 

Mahares

Well Known Member
Licensed User
In the below sub in the class module add the items I listed. You can change the colors to your liking:
B4X:
Public Sub Initialize (Callback As Object, EventName As String)
    et.Initialize("et")

    et.Color=Colors.White 'add this
    et.TextColor=Colors.black   'add this
    et.TextSize=24  'add this
 
Last edited:

katrad

Member
Licensed User
I love this searchview, my only want is that when someone searches something that the list still stays there. I'm using the searchview to show places on a map and would like to retain that result, I have also implemented the "show all" function, so I dont know what to change to make that happen.

Thank you very much in advance!!!
 

Erel

Administrator
Staff member
Licensed User
Do you mean that you want to keep the list open?

Go to SearchView class code. Select lv (the ListView) and press F7. You will immediately see all the references:



Now you can see where its visible property is changed.
 

katrad

Member
Licensed User
I love this searchview, my only want is that when someone searches something that the list still stays there. I'm using the searchview to show places on a map and would like to retain that result, I have also implemented the "show all" function, so I dont know what to change to make that happen.

Thank you very much in advance!!!
No, what I mean is when a user searches and there is more defined detail in the list that even after they select something (from that list) that it isnt redrawn and the original (search) list is intact. So, they can select others from that (prev searched) list.
 

katrad

Member
Licensed User
No, what I mean is when a user searches and there is more defined detail in the list that even after they select something (from that list) that it isnt redrawn and the original (search) list is intact. So, they can select others from that (prev searched) list.
PS. I didnt know you could do that, cool! (about F7)
 

Erel

Administrator
Staff member
Licensed User
Do you want to resort the list and move the matched items to the top?
 

katrad

Member
Licensed User
PS. I didnt know you could do that, cool! (about F7)
Let me try to make this simple, if I could retrive the original search (text), I think I could make it just go to that. I just cant find how to get the original search text out of the the search view. I always get what I'm searching for (selected) not the texted searched. It's because its in the other class. (I think)
 
Last edited:

Erel

Administrator
Staff member
Licensed User
This is indeed simple. Make 'et' variable a public variable and then get the query with et.Text.
 

LucaMs

Expert
Licensed User
I had the impression of seeing a "SearchView db" or something like that, yesterday when I did a search on the site.

Am I wrong?

Using a db there would be no limit to the index characters.
 

Erel

Administrator
Staff member
Licensed User
No. You cannot intercept the text changed event of the search dialog. Without it SearchView it not useful.
 
Status
Not open for further replies.
Top