I'm tring to use the webview for show a image and zoom it.
if i set the image url, i cannot manage the image size, the big image is showed only a part.
if i set a html page with img tag i can set width and height parameters.
The problem is find the right value for this parameter,
for a display size of 480x800 the image size for a big image to full screen is 305x515.
Can i calculate this value for other phones and display size?
I have already use TouchImageView with bad result.
if i set the image url, i cannot manage the image size, the big image is showed only a part.
if i set a html page with img tag i can set width and height parameters.
The problem is find the right value for this parameter,
for a display size of 480x800 the image size for a big image to full screen is 305x515.
Can i calculate this value for other phones and display size?
I have already use TouchImageView with bad result.
B4X:
Dim ImageWidth As Int
Dim ImageHeight As Int
Activity.LoadLayout("main")
WebView1.Width = 100%x
WebView1.Height = 100%y
ImageWidth = 305
ImageHeight = 515
WebView1.LoadHtml("<html><head></head><body><img src='http://www.domain/big-image.jpg' width='" & ImageWidth & "' height='" & ImageHeight & "'></body></html>")
End Sub