Hello everyone,
in a little app, i try to put a web page by this way, using a webview object in the designer which name is wv1.
with an editor, I build a page I save as 'index.html'.
This page has text and pictures.
When I import in the index.html in b4a, the pictures are in a folder 'images' I create.
But, when I launch the app, the pictures don't appear, letting only a blank area.
Here is my code. Is there a mistake somewhere ?
in a little app, i try to put a web page by this way, using a webview object in the designer which name is wv1.
with an editor, I build a page I save as 'index.html'.
This page has text and pictures.
When I import in the index.html in b4a, the pictures are in a folder 'images' I create.
But, when I launch the app, the pictures don't appear, letting only a blank area.
Here is my code. Is there a mistake somewhere ?
B4X:
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("hc")
File.Copy(File.DirAssets, "index.html", File.DirInternal, "index.html")
File.MakeDir(File.Dirinternal, "\images")
If File.Exists(File.Dirinternal & "/\images","auto.png" ) = False Then
File.Copy(File.DirAssets, "auto.png", File.Dirinternal & "/\images", "auto.png")
End If
wv1.LoadUrl("file://" & File.Combine(File.DirInternal, "index.html"))'ok but no image
End Sub