Trouble in loading local html file from asset into a webview. HTML page has javascript code, so I have used webview.setJavaScriptEnabled(true) to enable it. It loads the html page, but not all the widgets properly. Any suggestions...
Asked
Active
Viewed 1,828 times
1 Answers
3
public class ViewWeb extends Activity {
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.webview);
WebView wv;
wv = (WebView) findViewById(R.id.webView1);
wv.loadUrl("file:///android_asset/hello.html");
}
}

Ketan Parmar
- 2,962
- 19
- 27
-
I did exactly the same, and even enabled the Javascript for the webview. But, I have a folder which has an HTML page and many javascript files linked to it. It displays the HTML page but, rendering the images is not happening properly. – Manjunath Sep 12 '12 at 09:12