| | |
| | | if (url.startsWith("weixin://") || url.startsWith("alipay://")) { |
| | | |
| | | } else if (!url.startsWith("http")) { |
| | | if (jumpOutProtocolSet != null) { |
| | | for (String prefix : jumpOutProtocolSet) { |
| | | if (url.startsWith(prefix)) { |
| | | Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url)); |
| | | startActivity(intent); |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | return true; |
| | | } |
| | | return super.shouldOverrideUrlLoading(view, url); |
| | |
| | | |
| | | private String wholeTitle; |
| | | |
| | | private Set<String> jumpOutProtocolSet; |
| | | |
| | | @Override |
| | | protected void onCreate(Bundle savedInstanceState) { |
| | | super.onCreate(savedInstanceState); |
| | |
| | | progressBar.setProgressDrawable(this.getResources() |
| | | .getDrawable(R.drawable.color_progressbar)); |
| | | initX5WebView(); |
| | | jumpOutProtocolSet = AppConfigUtil.getBrowserJumpOutProtocolPrefix(getApplicationContext()); |
| | | webview.loadUrl(getIntent().getStringExtra("url")); |
| | | wholeTitle = getIntent().getStringExtra("title"); |
| | | if (!StringUtils.isEmpty(wholeTitle)) { |