CustomListView, HttpJob and images

sktanmoy

Active Member
Licensed User
Longtime User
By a httpjob download, I get something like
B4X:
Demo Title, EdFreSdT; Demo title 2, g4DdfrEr;

I need to display title and image in a list view. I'm using CustomListView Modified.
I process the data this way
B4X:
Sub JobDone (Job As HttpJob)
    If Job.success = True Then
   Select Job.JobName
      Case "Part1"
           Dim List1 As List
           List1 = Regex.Split(";", Job.GetString)
         
         For Each lists As String In List1
            Dim list2 As List
            list2 = Regex.Split(",", lists)
            CustomListView1.AddTextItem(list2.Get(0), "", list2.Get(1), Null)
            Dim HttpJob1.Initialize("Image", Me)
            HttpJob1.Download("http://img.myserver.com/" & list2.Get(1) & "/thumb.jpg")
         Next
      Case "Image"
         dim bmp as bitmap
         bmp = job.GetBitmap
         'How Can I add the image in the listview now?
         'Please advice me to understand and solve the issue
      End Select
End Sub
 
Last edited:

sktanmoy

Active Member
Licensed User
Longtime User
Failed to understand

I've checked several times, tried some hours but failed to understand how to use that in my case.

As the CustomListView modified class I've used here has direct option to add image (but the tuto you've created was using imageviews in layout file), I planned to pass image into the position after image download completion.

Probably a bit detail instruction can help me to understand.
 
Upvote 0
Top