Android Question File Explorer [Class] - split file names in a ListView?

Alexander66

New Member
Hello. I got the file names;
MsgboxAsync(dlgFileExpl.Selection.ChosenFile) = (file1; file2; file3).
How to add and split file names in a ListView? Sorry for the auto-translation.
 

Alexander66

New Member
Hello everyone, I have found a solution to the issue.

B4X:
    dlgFileExpl.Initialize(Activity, "/sdcard", ".bmp,.gif,.jpg,.png,.mp4", True, False, "OK")
    dlgFileExpl.ExplorerMulti2(False)
       
    If Not(dlgFileExpl.Selection.Canceled Or dlgFileExpl.Selection.ChosenFile = " ") Then
        Dim s() As String =  Regex.Split(";", dlgFileExpl.Selection.ChosenFile)
               
        For i = 0 To s.Length-1
            ListView1.AddSingleLine(s(i))
        Next
    End If

It works! Thanks
 
Upvote 0
Top