Android Question Get Position As Int from SearchView

A Z M JANNAT UL KARIM

Member
Licensed User
Hi, I need to get the code while clicking on a SerchView item. I think need to put some line here to callback the Position. How can I do it?
Like the ItemClick I want to catch both Position and Value on SearchView click event. Below is the portion of the code taken from SearchView class. Please help ...

B4X:
Private Sub lv_ItemClick (Position As Int, Value As Object)
    ' Dim it As Item = Value
    ' et.Text = it.Title
    ' et.SelectionStart = et.Text.Length
    IME.HideKeyboard
    ' lv.Visible = False
    If SubExists(mCallback, mEventName & "_ItemClick") Then
        CallSub2(mCallback, mEventName & "_ItemClick", Value)
    End If
End Sub
 

klaus

Expert
Licensed User
Longtime User
Replace
CallSub2(mCallback, mEventName & "_ItemClick", Value)
by
CallSub3(mCallback, mEventName & "_ItemClick", Position, Value)

You need also to adapt the xxx_ItemClick event routine in the calling module.
 
Upvote 0
Top