How to pass an HTML string to a WebView in Android

String myHtmlString = "

html string

"; WebView webview = (WebView)this.findViewById(R.id.WebView1); webview.getSettings().setJavaScriptEnabled(false); webview.loadDataWithBaseURL("", myHtmlString, "text/html", "UTF-8", "");

Leave a Comment

Your email address will not be published. Required fields are marked *