I'm using WebView to show an image and I want it "fit" the screen. This is my code
It works ok on small screen (320x480) but on bigger screen (480x800) it only shows half of image. Please view the attached files. I don't understand what's wrong here?
B4X:
Dim PZW As WebView
Dim ww As Int
PZW.Initialize("PZW")
Activity.AddView(PZW, 0, 0, 100%x, 100%y)
If Activity.Width > Activity.Height Then
ww = Activity.Height
Else
ww = Activity.Width
End If
PZW.LoadHtml("<html><body topmargin='0' leftmargin='0' marginwidth='0' marginheight='0'><center><img src='file:///android_asset/testimage.jpg' width='" & ww &"'/></center></body></html>")
It works ok on small screen (320x480) but on bigger screen (480x800) it only shows half of image. Please view the attached files. I don't understand what's wrong here?