Sub ImagesJobDone (Job As HttpJob)
'Log("ImageJobDone called "&ImageIndex)
If Job.Success = True Then
Dim iv As ImageView
iv.Initialize("") 'not interested in any events so we pass empty string.
Dim bd As BitmapDrawable
bd.Initialize(Job.GetBitmap)
iv.Background = bd 'set the background of the image view.
iv.Gravity=Gravity.fill
iv.Tag=ImageIndex
' If iv.Height>190 Then
' iv.Width=iv.Width*190/iv.Height
' iv.Height=190
' End If
'add the image view to the scroll bar internal panel. Left, Top, Width, Height
ScrollView1.Panel.AddView( iv, 5dip, 5dip + (ImageIndex * 200dip), iv.Width, 190dip)
'ivs(ImageIndex).Bitmap = Job.GetBitmap
'ivs(ImageIndex).Gravity = Gravity.FILL
End If
ImageIndex = ImageIndex + 1
ScrollView1.Panel.Height=ImageIndex * 200dip
End Sub