I have looked at numerous examples of loading images into ListView, but all seem to pertain to downloading from Http sites.
I am successfully downloading a BLOB from my remote MySQL database and am able to display the image in a ImageView and text in a Label.
I use this code from my JobDone sub:
How can I place the Image and the Text into a ListView control?
I could have numerous records and need to display in a ListView with the image on the left and the text on the right of the image.
The user can then scroll through the list of images and text
I am successfully downloading a BLOB from my remote MySQL database and am able to display the image in a ImageView and text in a Label.
I use this code from my JobDone sub:
B4X:
If result.Tag = "select_img" Then
For Each records() As Object In result.Rows
Dim Buffer() As Byte
Dim HeaderTxt As String
Buffer = records(result.Columns.Get("img02"))
HeaderTxt = records(result.Columns.Get("TxtHeader"))
Dim InputStream1 As InputStream
InputStream1.InitializeFromBytesArray(Buffer, 0, Buffer.Length)
Dim Bitmap1 As Bitmap
Bitmap1.Initialize2(InputStream1)
InputStream1.Close
ImageView1.SetBackgroundImage(Bitmap1)
Label1.Text = HeaderTxt
Next
End If
I could have numerous records and need to display in a ListView with the image on the left and the text on the right of the image.
The user can then scroll through the list of images and text