Sub Activity_Create(FirstTime As Boolean)
Activity.LoadLayout("1")
WebView1.LoadHtml($"<img src="${WebViewAssetFile( "elem2.html")}"/>"$)
End Sub
Sub WebViewAssetFile (FileName As String) As String
Dim jo As JavaObject
jo.InitializeStatic("anywheresoftware.b4a.objects.streams.File")
If jo.GetField("virtualAssetsFolder") = Null Then
Return "file:///android_asset/" & FileName.ToLowerCase
Else
Return "file://" & File.Combine(jo.GetField("virtualAssetsFolder"), _
jo.RunMethod("getUnpackedVirtualAssetFile", Array As Object(FileName)))
End If
End Sub