/Android-WebView-Example

Example project to showcase how to load a local html file into a webview within an Android application

Primary LanguageKotlinApache License 2.0Apache-2.0

Android-WebView-Example

Example project to showcase how to load a local html file into a webview within an Android application

Mainly written because edent asked the question

Application consits of one Web View with the layout defined in app/src/main/res/layout/activity_main.xml, and an activity to load the html app/src/main/java/site/zpweb/webviewsample/MainActivity.kt.

The HTML file is stored in the asset folder app/src/main/assets

By loading the URL using the file schema relative linking to files within the asset folder "should" (untested) work just fine.

See WebView for more details.