📜  android studio webview mailto - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:04.085000             🧑  作者: Mango

代码示例1
webView.setWebViewClient(new WebViewClient() {
            @Override
            public boolean shouldOverrideUrlLoading(WebView view, String url) {
                if( URLUtil.isNetworkUrl(url) ) {
                    return false;
                }

                Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
                startActivity( intent );
                return true;
            }
        });