Sub JobDone(Job As HttpJob)
Select Job.JobName
Case "Main page"
HandleMainPage(Job)
Case "ImageJob"
ImagesJobDone(Job)
Case "realSizeJob"
realSizeJobDone(Job)
End Select
Job.Release
End Sub
Sub realSizeJobDone(Job As HttpJob)
Dim dBmp As BitmapDrawable
dBmp.Initialize(Job.GetBitmap)
Dim bmp As Bitmap
bmp = dBmp.Bitmap
CallSubDelayed2(Activity2, "ShowImage", bmp)
End Sub
Sub img_Click
Dim iv As ImageView
iv = Sender
Dim tempUrl As String = iv.tag
tempUrl = tempUrl.Replace("thumb", "images")
Dim realSizeJob As HttpJob
realSizeJob.Initialize ("realSizeJob", Me)
realSizeJob.Download(tempUrl)
' If iv.Background Is BitmapDrawable Then
' 'It will be ColorDrawable when there is no image.
' Dim bd As BitmapDrawable
' bd = iv.Background
' Dim bmp As Bitmap
' bmp = bd.Bitmap
' CallSubDelayed2(Activity2, "ShowImage", bmp)
' End If
End Sub