Reputation: 1084
I started a blank activity in android studio, Added a Html file to "raw" folder. I created a webview and called function myWebView.loadUrl("file:///res/raw/test.html"). When running the app in the emulator, it shows file not found. Could anyone help?
Upvotes: 2
Views: 3915
Reputation: 11756
Use this snippet
WebView myWebView = (WebView)findViewById(R.id.my_webview);
lWebView.loadUrl("file:///android_res/raw/htmlfile.html");
Upvotes: 4