Android Question Reference background image/font from a webview/html page

Sanxion

Active Member
Licensed User
Longtime User
Guys

I have a webview on a panel that I am using to display a html page.

My question is, does anybody know how to reference a background image in the html page from the Assets folder? I understand that the webviewer itself cannot reference a back ground image so I am assuming it has to be done from the html page?

Also, the same question regarding a font in the Assets folder - how would it be referenced from the html page?

Thank-you in advance.
 

Sanxion

Active Member
Licensed User
Longtime User
ok, I did not realize that you are asking about a background image...
an image in the webview is referenced like this:
B4X:
<p align="center"><img alt="" src="file:///android_asset/123.png" width= "100%"><p align="center"><small>Blick auf das Freiburger M&uuml;nster</small></p>
some discussion about webview and fonts you can find here:
https://www.b4x.com/android/forum/threads/how-change-webview-font.50343/

Wouldn't this work with a background image too?
 
Upvote 0
Top