¾Èµå·ÎÀ̵å À¥ºä ¸µÅ© »õâó¸® |
|
|
![](icon/private_name/1.gif) |
10³â Àü |
private class MyWebViewClient extends WebViewClient {
@Override
public boolean shouldOverrideUrlLoading(WebView view, String url) {
if (Uri.parse(url).getHost().equals("www.example.com")) {
// This is my web site, so do not override; let my WebView load the page
return false;
}
// Otherwise, the link is not for a page on my site, so launch another Activity that handles URLs
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));
startActivity(intent);
return true;
}
} |
|
̵̧ : 635 |
̵̧
¸ñ·Ï
|
|