Dim htmlParser As Html
Dim desc As Label
desc.Initialize("")
desc.Text = htmlParser.FromHtml2(htmlString,"ImageGetter","TagGetter")
Sub ImageGetter_GetDrawable(Source As String) As Object
Dim data As Object = getImage(Source)
If data=Null Then
Return Null
Else
Dim b As BitmapDrawable = data '<- getting error on this line
Return b
End If
End Sub
Sub getImage(Source As String) As ResumableSub
Dim j As HttpJob
Dim BitmapDrawable1 As BitmapDrawable
j.Initialize("", Me)
j.Download(Source)
Wait For (j) JobDone(j As HttpJob)
If j.Success Then
BitmapDrawable1.Initialize(j.GetBitmap)
Dim l As LabelExtras:l.SetDrawableBounds(BitmapDrawable1, 0, 0, j.GetBitmap.Width, j.GetBitmap.Height)
j.Release
Return BitmapDrawable1
Else
j.Release
Return Null
End If
End Sub