Load Html Into Webview In Android?
I am loading following html content into the webview. But im getting following error: Web page not available text/html;utf8%3C!DOCTYPE%20HTML%20PUBLIC%20//W3C// ........ and
Solution 1:
WebView wv = (WebView)findViewById(R.id.webView);
wv.loadDataWithBaseURL("notreal/", data_html, "text/html", "utf-8",null);
Solution 2:
I have this code to open an html.
WebView web = new WebView(this);
web.loadUrl("file:///sdcard/file.html");//The file:// is the protocol and it's nedded for internal files
Post a Comment for "Load Html Into Webview In Android?"