Sub DownloadAndSetImage(Url As String, iv As ImageView)
Log("♥♥♥♥♥♥♥♥♥♥ DownloadAndSetImage ♥♥♥♥♥♥♥♥♥♥♥♥♥♥")
Dim j As HttpJob
j.Initialize("", Me)
j.Download(Url)
Wait For (j) JobDone (j As HttpJob)
If j.Success Then
Try
'the item might have already been removed
If iv.IsInitialized Then
Wait For (BitmapsAsync1.LoadFromHttpJob(j, iv.Width, iv.Height)) Complete (bmp As B4XBitmap)
If bmp.IsInitialized And iv.IsInitialized Then
iv.Bitmap = bmp
iv.Gravity = Gravity.Fill
End If
End If
Catch
Log(LastException)
End Try
End If
j.Release
End Sub