WebView wv = (WebView)findViewById(R.id.webView_event);
wv.getSettings().setJavaScriptEnabled(true);
wv.requestFocus();
wv.setScrollBarStyle(WebView.SCROLLBARS_OUTSIDE_OVERLAY);
wv.postUrl(url, EncodingUtils.getBytes("", "base64"));
WebView的postUrl方法说明如下:
Converts the specified string to a byte array. If the charset is not supported the default system charset is used.
Parameters
data | the string to be encoded |
charset | the desired character encoding |
Returns
· The resulting byte array.