[main module]
private Sub c6IconLs_Click
MainMasterShowImage(File.DirAssets, "stromverlauf.jpg")
End Sub
Private Sub MainMasterShowImage(Dir As String, FileName As String)
' Erel --> https://www.b4x.com/android/forum/threads/b4x-use-webview-to-show-large-images.102910/#content
MainMasterWv.Visible = True
#if B4A
Dim jo As JavaObject = Me
jo.RunMethod("zoom", Array(MainMasterWv))
#End If
MainMasterWv.LoadHtml(Starter.mh.HtmlImageString(Starter.xui.FileUri(Dir, FileName), 100%x, 100%y))
End Sub
[myhelper class]
public Sub HtmlImageString(ImageFileName As String, Width As Int, Height As Int) As String
Return $"
<html>
<head>
<style Type="text/css">
img {
position: absolute;
width: ${Width}px;
height: ${Height}px;
left: 50%;
top: 50%;
margin-left: -${Width/2}px;
margin-top: -${Height/2}px;
}
</style>
</head>
<body>
<img src="${ImageFileName}">
</body>
</html>
"$
End Sub