This seems not to work on iPhone 6 on iOS 11. Don’t understand why. Only a white page is showed.
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