The difference between loadData () and loadDataWithBaseURL () in the WebView class .....?

can someone tell me the difference between loadData () and loadDataWithBaseURL () in the WebView class.

when I used web.loadDataWithBaseURL("",html, mimetype, encoding,""); in my program, where html is a string containing hard-coded html tags, its display is exactly the same as the html page where, when I used loadData (html, mimetype, encoding) in my code, the application closes.

I read the API, but could not understand it ..... so please help me ...

Thanks at Advance

Ash

+7
source share
1 answer

If someone comes across this, WebView.loadData seems to be broken:

http://code.google.com/p/android/issues/detail?id=1733#c23

http://code.google.com/p/android/issues/detail?id=3552

The solutions proposed in the OP question are a workaround. I believe that zeros are cheaper than "", so I used this:

 web.loadDataWithBaseURL(null,html, "text/html", "utf-8",null); 
+8
source

All Articles