iOS Question Searchview problem

tufanv

Expert
Licensed User
Longtime User
Hello

I am using he searchview module by Erel and modified by Mr.Narek Adonts here
https://www.b4x.com/android/forum/threads/class-searchview.48576/

I can add my txt file as to a list and load this list via searchview. All the items are added successfuly but when i click on an item it gives me empty string altough it is not empty. I Use:

B4X:
Sub actlimansec_ItemClick (Value As String)

alan2=Value
    If actlimansec.Searching Then
        Msgbox("Chosen value: " & Value, "")
        actlimansec.HideSearchView(True)
    Else
   
    End If
    Log(Value)
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
In the original SearchView the following code raises the event:
B4X:
Private Sub lv_SelectedChanged (SectionIndex As Int, Cell As TableCell)
   et.Text = Cell.Text.ToString
   lv.SetSelection(0, -1)
   et.ResignFocus
   lv.Visible = False
   CallSub2(mCallback, mEventName & "_ItemClick", et.Text)
End Sub

The parameter is the value of the text field.
 
Upvote 0
Top