mWebView = (WebView) findViewById(R.id.webView); mWebView.setWebViewClient(new WebViewClient() { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); return true; } });
mWebView = (WebView) findViewById(R.id.webView); mWebView.setWebViewClient(new WebViewClient() { @Override public void onPageStarted(WebView view, String url, Bitmap favicon) { super.onPageStarted(view, url, favicon); } }); WebSettings webSettings = mWebView.getSettings(); //支持js webSettings.setJavaScriptEnabled(true); //支持对网页缩放 webSettings.setSupportZoom(true); //支持android4.0 webSettings.setBuiltInZoomControls(true); //默认缩放模式 webSettings.setDefaultZoom(ZoomDensity.CLOSE); mWebView.setInitialScale(100); //载入url
声明:本网页内容旨在传播知识,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。TEL:177 7030 7066 E-MAIL:11247931@qq.com