mWebView = (WebView) findViewById(R.id.mwebview);
mWebView.getSettings().setJavaScriptEnabled(true);
mWebView.setWebViewClient(new webViewClient ());
//自适应屏幕
mWebView.getSettings().setLayoutAlgorithm(LayoutAlgorithm.SINGLE_COLUMN);
mWebView.getSettings().setLoadWithOverviewMode(true);
// text = getIntent().getStringExtra("text");
loadData();
private class webViewClient extends WebViewClient {
public boolean shouldOverrideUrlLoading(WebView view, String url) {
view.loadUrl(url);
return true;
}
}
private void loadData() {
// if (TextUtils.isEmpty(url))
// mWebView.loadUrl("");
mWebView.loadUrl("http://112.126.83.45:8065/merchant_agreement.html");
}