Android Question Displaying HTML document with pictures

Arf

Well-Known Member
Licensed User
I wish to display a large amoun of mixed text and images onscreen in a panel or webview or something. I thought that it might be best to just wrap the document and images up in a HTML document, and load that into the webview, as then different screen sizes will just make the HTML adjust itself like it does when I change a browser page width, if you see what I mean.


I wanted to just load the HTML doc into my 'Files' in B4A and thus it gets distributed within the apk file. The problem is, where do I put the images used in the HTML file? can I have subfolders in the 'Files' directory?

Or is there a simpler way to do what I'm wanting to do that I've missed?
Thanks.
 

Arf

Well-Known Member
Licensed User
Or even displaying just the HTML file.. I load the webview like this:
B4X:
WebView1.LoadHtml("file:///android_asset/lessons.htm")

but all I get is a webview that shows that filename as text, rather than the contents of the file. This is in debug and release modes, I'm blatantly doing something stupid, but its the first time I've used html or webviews so expected I guess.
 
Upvote 0
Top