Embedded images throw off anchors in WebView

nfordbscndrd

Well-Known Member
Licensed User
Longtime User
When an HTML file contains images which are larger than (or even equal to) a device's screen, it throws off calls to anchors in WebView, such that the part of the file with the anchor does not appear on screen.

Example:

B4X:
fi="File://" & File.Combine(File.DirInternal, "temp.htm#SRCHTMP")
ViewHelp.LoadURL(fi)

With the above code, the text following the anchor "SRCHTMP" will appear properly (on screen) on a device larger than embedded pictures but not on a smaller device.

A lengthy discussion and test app are in this post and related discussions of the problem in the posts around it.
 

nfordbscndrd

Well-Known Member
Licensed User
Longtime User
Okay. I'm working around it by making a duplicate HTML file which calls smaller screen shots which are no bigger than the phone's screen (I hope). For tablets, the regular HTML file uses screen shots which are smaller than a 7" tablet's screen and I use that on all 7" and larger tablets. It seems to be working okay now.
 
Top