Android Question SearchView question file.dat

gregorio_adrian_gimenez

Active Member
Licensed User
Longtime User
sorry to ask this question, maybe it's very basic
I don't know how to replace existing files on searchview so you can use a flat txt file that contains country names.
who can help me? I don't understand this from the index and files.dat
B4X:
Private Sub LoadIndices
    Dim ser As B4XSerializator
    ser.Tag = 1
    ser.ConvertBytesToObjectAsync(Bit.InputStreamToBytes(File.OpenInput(File.DirAssets,"first.dat")),"ser")
    
    

End Sub

Private Sub ser_BytesToObject (Success As Boolean, NewObject As Object)
    Log(NewObject)
    ProgressBar1.Visible = False
    If Success Then
        Dim ser As B4XSerializator = Sender
        Log($"BytesToObject: ${ser.Tag}"$)
        If ser.Tag = 1 Then
            firstIndex = NewObject
            sv.LoadFirst(firstIndex)
            ser.Tag = 2
            'read the secondary index
            ser.ConvertBytesToObjectAsync( _
                Bit.InputStreamToBytes(File.OpenInput(File.DirAssets, "second.dat")), "ser")
        Else if ser.Tag = 2 Then
            secondIndex = NewObject
            
                    End If   
    End If
End Sub
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…