I’m trying to display the div inside the WebView using the follwoing function
browser.loadData("<html> <head> <body> <H2> HI </H2> " +
"<div id='map_canvas' style='width:20%;height:20%;'></div>" +
" </body> </head> </html>", "text/html", "UTF-8");
but this doessn’t load the html page gives the error
browser.setWebViewClient(new WebViewClient() {
@Override
public void onPageFinished(WebView view, String url){
System.out.println("URL:::"+url);
}
@Override
public void onReceivedError(WebView view, int errorCode, String description, String failingUrl) {
System.out.println("URL:::"+failingUrl+" "+description+" "+errorCode);
Toast.makeText(getApplicationContext(), "Oh no! " + description, Toast.LENGTH_LONG).show();
}
});
response shown as URL you are trying to load is invalid. please tell me what is wrong here
Android 2.3