Android Question MiniSearchView - pass data to main activity

trepdas

Member
Licensed User
Hello Good People.

I've managed to implement the minisearchview into my project.

in the minisearchview.bas I've modified the following and put the minisearchview results into two strings.

B4X:
Private Sub CLV_ItemClick (Index As Int, Value As Object)
    Dim m As MSVItemData = Value
    TextField.Text = ""
    Log(m.item)
    Str5=m.Item
    
    strSplit=Regex.Split(",",Str5)
    Main.TmpStr=strSplit(0)
    Main.TmpStr1=strSplit(1)
    
    Sleep(0)
now, in the main activity I created two labels.

how do I display 'tmpstr' and 'tmpstr1' inside the main activity form?

I was hoping for main.label1.text=str1 to work but I'm missing something...

Thank you
 

DonManfred

Expert
Licensed User
B4X:
Private Sub CLV_ItemClick (Index As Int, Value As Object)
    Dim m As MSVItemData = Value
    CallSub2(mCallBack,"ShowResult",Value)
    CLV.GetBase.Visible = False
End Sub
in Main

B4X:
Sub ShowResult(item As Object)
    Dim m As MSVItemData = item
    Log("Main.ShowResult("&m&")")
    ' Do the split here and then change the Edits...
End Sub
 

Attachments

Top