Code example for WebView

Methods: stopLoading

0
//    } 
 
    private class WeiboWebViewClient extends WebViewClient {
 
        @Override 
        public boolean shouldOverrideUrlLoading(WebView view, String url) {
            Log.d(TAG, "Redirect URL: " + url);
            // 待后台增加对默认重定向地址的支持后修改下面的逻辑 
            if (url.startsWith(mWeibo.getRedirectUrl())) {
                handleRedirectUrl(view, url);
                WeiboDialog.this.dismiss();
                return true; 
            } 
            // launch non-dialog URLs in a full browser 
            getContext().startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(url)));
            return true; 
        } 
 
        @Override 
        public void onReceivedError(WebView view, int errorCode, String description,
                String failingUrl) {