I would like you to help me with this topic, because I have a folder with html content, in the folder is the index.html, the css folder, the images folder and everything related to the page; I want to show this page in an activity through a WebView, I don't have an example to show but I saw a project that had this in an Asset folder; Can someone help me please.
You definitely have to first save your html or html resources inside the assets folder.
Create the folder, since by default it does not exist:
When creating the folder place your html and resources inside, it is important that you define the references within your html by calling them through
file:///android_asset
, to load the html in a WebView from assets it is done in this way:To load an html from assets:
Remember that the index.html must make references to the other files (css, js, etc) through relative paths.
Greetings.