A AmenO123 Member Licensed User Longtime User Dec 6, 2018 #1 Say I have logo.jpg added to the assets folder how can I use LoadURL() method and have that image referenced in the HTML code? (external URL) or I can only use LoadHTML()? I already tried: HTML: <img src='file:///android_asset/logo.jpg'/> But it didn't work Thank You.
Say I have logo.jpg added to the assets folder how can I use LoadURL() method and have that image referenced in the HTML code? (external URL) or I can only use LoadHTML()? I already tried: HTML: <img src='file:///android_asset/logo.jpg'/> But it didn't work Thank You.
mcqueccu Expert Licensed User Longtime User Dec 6, 2018 #2 Can you explain further what you are trying to achieve? is the html code also included in the assets folder or its from online? Check this, it might help https://www.b4x.com/android/forum/threads/using-webview-files-in-the-assets-directory.69996/ Upvote 0
Can you explain further what you are trying to achieve? is the html code also included in the assets folder or its from online? Check this, it might help https://www.b4x.com/android/forum/threads/using-webview-files-in-the-assets-directory.69996/
A AmenO123 Member Licensed User Longtime User Dec 6, 2018 #3 mcqueccu said: Can you explain further what you are trying to achieve? is the html code also included in the assets folder or its from online? Check this, it might help https://www.b4x.com/android/forum/threads/using-webview-files-in-the-assets-directory.69996/ Click to expand... The html code is online, so i load something like "https://www.ameno.com/index.html" but i want to set the imgs from the assets, so it loads faster Upvote 0
mcqueccu said: Can you explain further what you are trying to achieve? is the html code also included in the assets folder or its from online? Check this, it might help https://www.b4x.com/android/forum/threads/using-webview-files-in-the-assets-directory.69996/ Click to expand... The html code is online, so i load something like "https://www.ameno.com/index.html" but i want to set the imgs from the assets, so it loads faster
Erel B4X founder Staff member Licensed User Longtime User Dec 7, 2018 #4 You will need to download the html with OkHttpUtils2, modify the links and then load it with WebView.LoadHtml. Upvote 0
You will need to download the html with OkHttpUtils2, modify the links and then load it with WebView.LoadHtml.