Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ekos/2192cd58e02f598f882c132ad1799551 to your computer and use it in GitHub Desktop.
Save ekos/2192cd58e02f598f882c132ad1799551 to your computer and use it in GitHub Desktop.
WebView webview;
String htmlString = "<script>"+
"httpObj = new XMLHttpRequest();"+
"httpObj.open('GET', 'http://test.ekos.biz/android_loadDataWithBase.txt', false);"+
"xmlHttp.send(null);"+
"document.write(xmlHttp.responseText);"+
"</script>";
webview = (WebView)findViewById(R.id.webView);//layoutのWebView参照
webview.getSettings().setJavaScriptEnabled(true);
webview.loadDataWithBaseURL( null, htmlString, "text/html", "UTF-8", null );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment