S Sanxion Active Member Licensed User Longtime User Dec 10, 2015 #1 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.
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.
eurojam Well-Known Member Licensed User Longtime User Dec 10, 2015 #2 an image in the webview is referenced like this: Code: Copy <p align="center"><img alt="" src="file:///android_asset/123.png" width= "100%"><p align="center"><small>Blick auf das Freiburger Mü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/ Upvote 0
an image in the webview is referenced like this: Code: Copy <p align="center"><img alt="" src="file:///android_asset/123.png" width= "100%"><p align="center"><small>Blick auf das Freiburger Mü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/
eurojam Well-Known Member Licensed User Longtime User Dec 10, 2015 #3 ok, I did not realize that you are asking about a background image... Upvote 0
S Sanxion Active Member Licensed User Longtime User Dec 11, 2015 #4 eurojam said: ok, I did not realize that you are asking about a background image... Click to expand... eurojam said: an image in the webview is referenced like this: Code: Copy <p align="center"><img alt="" src="file:///android_asset/123.png" width= "100%"><p align="center"><small>Blick auf das Freiburger Mü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/ Click to expand... Wouldn't this work with a background image too? Upvote 0
eurojam said: ok, I did not realize that you are asking about a background image... Click to expand... eurojam said: an image in the webview is referenced like this: Code: Copy <p align="center"><img alt="" src="file:///android_asset/123.png" width= "100%"><p align="center"><small>Blick auf das Freiburger Mü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/ Click to expand... Wouldn't this work with a background image too?