Android – Load a String into WebView

Android – Load a String into WebView

To load html data from a String into a WebView, you can use the following method:
yourWebView.loadDataWithBaseURL("x-data://base", stringToLoadInWebView, "text/html", "UTF-8", null);

Note that the UTF-8 charset might be different for your data so change it accordingly..

 

, ,
Previous Post
Android Custom Title Bar (IOS style)
Next Post
Android Multi-Touch: Two Fingers Tapping Once

Related Posts

Menu