Sub Globals
Dim b As Bitmap
Dim p As Panel
Dim iv As ImageView
End Sub
Sub Activity_Create(FirstTime As Boolean)
p.Initialize("") ' initializes a panel
iv.Initialize("") ' initializes an imageview
Activity.AddView(p, 0, 0, 100, 100) ' add the panel to activity (100x100)
Dim job As HttpJob
job.Initialize("dl_test", Me)
job.Download("http://www.where your image is on the web")
add_image ' a sub that will show the image
End Sub
Sub add_image
p.AddView(iv,0,0,100,100) ' add the imageview to a panel...in a different sub
End Sub
Sub JobDone (Job As HttpJob)
If Job.Success = True Then
b=Job.GetBitmap
iv.Bitmap=b ' adds the bitmap to an imageview
Else
ToastMessageShow("Error: " & Job.ErrorMessage, True)
End If
End Sub