I get the error "java.lang.RuntimeException: Method: zoom not found" when I call ShowImage and as soon as it reaches the jo.RunMethod line
B4X:
'xui is a global XUI object.
Private Sub ShowImage(WV As WebView, Dir As String, FileName As String)
#if B4A
Dim jo As JavaObject = Me
jo.RunMethod("zoom", Array(WV))
#End If
If xui.IsB4J Then
WV.LoadHtml($"<img src="${xui.FileUri(Dir, FileName)}"/>"$)
Else
If Dir = File.DirAssets Then FileName = FileName.ToLowerCase
If xui.IsB4A Or Dir = File.DirAssets Then
WV.LoadHtml($"<img src="${xui.FileUri(Dir, FileName)}"/>"$)
Else
WV.LoadUrl("file://" & File.Combine(Dir, FileName))
End If
End If
End Sub
#if Java AND B4A
Public static void zoom(android.webkit.WebView WV) {
WV.getSettings().setUseWideViewPort(True);
WV.setInitialScale(1);
}
#End If