Hi i try to load pictures into ImageView on the designer "ImageView1, ImageView2" but the are empty.
B4X:
Sub paneel1
For i = 1 To 2
Dim ImageView1, ImageView2 , ImageView3 As ImageView
Dim ImageViews() As ImageView
ImageViews = Array As ImageView(ImageView1, ImageView2, ImageView3)
ImageViews(i).Initialize("")
SQL.Initialize(File.DirRootExternal, "Perel/pere.db", False)
cur = SQL.ExecQuery2("SELECT * FROM lachaise WHERE id = ?", Array As String(i))
cur.Position = 0
Dim Buffer() As Byte 'declare an empty byte array
Buffer = cur.GetBlob("pic")
Dim InputStream1 As InputStream
InputStream1.InitializeFromBytesArray(Buffer, 0, Buffer.Length)
Dim Bitmap11 As Bitmap
Bitmap11.Initialize2(InputStream1)
ImageViews(i).SetBackgroundImage(Bitmap11)
Next
InputStream1.Close
End Sub