Home >Web Front-end >HTML Tutorial >Add the wireless Taobao page to android webview and click the baby details link to enter the baby details page. The problem cannot be returned_html/css_WEB-ITnose
In the past few days, I have been trying to introduce the wireless Taobao page into the webview. I found that after clicking on the product details to enter the page, I cannot return.
At first, I followed what most people on the Internet said to display the link in the same webview. Page, thus overloading the shouldOverrideUrlLoading method of WebClient
mWebView = (WebView) findViewById(R.id.webView); mWebView.setWebViewClient(new WebViewClient() { @Override public boolean shouldOverrideUrlLoading(WebView view, String url) { view.loadUrl(url); return true; } });I found that after clicking the baby details link page, I cannot return. I have tried various methods, but it cannot be solved!
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); //载入urlmWebView.loadUrl(" http ://m.taobao.com/channel/chn/mobile/tejia_taoke.php?pid=mm_11443354_6190798_21526785");