{"id":974,"date":"2011-07-29T19:48:55","date_gmt":"2011-07-29T10:48:55","guid":{"rendered":"https:\/\/ecoop.net\/memo\/?p=974"},"modified":"2011-08-22T18:21:32","modified_gmt":"2011-08-22T09:21:32","slug":"the-way-for-shouldoverrideurlloading-to-determine-catching-a-redirect-in-a-webview","status":"publish","type":"post","link":"https:\/\/www.ecoop.net\/memo\/archives\/the-way-for-shouldoverrideurlloading-to-determine-catching-a-redirect-in-a-webview.html","title":{"rendered":"WebView\u306eshouldOverrideUrlLoading()\u5185\u3067\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u5224\u5b9a"},"content":{"rendered":"<p>WebView \u3067\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3067\u306f\u306a\u304f\u30e6\u30fc\u30b6\u30af\u30ea\u30c3\u30af\u306e\u307f\u3092\u98db\u3070\u3057\u305f\u3044\u5834\u5408\u3001<\/p>\n<p>\u4e0b\u8a18\u306e\u3088\u3046\u306b\u3059\u308b\u3068\u3044\u3044\u3088\u3046\u3067\u3059\u3002<\/p>\n<div>\n<pre class=\"brush: java; title: ; notranslate\" title=\"\">\r\n&lt;pre&gt;&lt;code&gt;mWebView.setWebViewClient(new WebViewClient() { &lt;\/code&gt;&lt;\/pre&gt;\r\n&lt;pre&gt;\tpublic boolean shouldOverrideUrlLoading(WebView view, String url) {\r\n\t    if(view.getHitTestResult().getType() &amp;gt; 0){\r\n\t         \/\/ \u30e6\u30fc\u30b6\u304c\u81ea\u5206\u3067\u30af\u30ea\u30c3\u30af\u53c2\u7167\u3057\u305f\u30da\u30fc\u30b8\r\n\t         return true;\r\n\t    } else {\r\n\t         \/\/ \u30af\u30ea\u30c3\u30af\u3055\u308c\u306a\u304b\u3063\u305f\u306e\u3067\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3068\u307f\u306a\u3059\u3002\r\n\t         return false;\r\n\t    }\r\n\t}\r\n&lt;span class=&quot;Apple-style-span&quot; style=&quot;font-family: monospace;&quot;&gt;}&lt;\/span&gt;&lt;\/pre&gt;\r\n<\/pre>\n<\/div>\n<div>\u53c2\u8003:<\/div>\n<div><a href=\"http:\/\/stackoverflow.com\/questions\/3852414\/in-a-webview-is-there-a-way-for-shouldoverrideurlloading-to-determine-if-it-is-ca\">http:\/\/stackoverflow.com\/questions\/3852414\/in-a-webview-is-there-a-way-for-shouldoverrideurlloading-to-determine-if-it-is-ca<\/a><\/div>\n","protected":false},"excerpt":{"rendered":"<p>WebView \u3067\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u3067\u306f\u306a\u304f\u30e6\u30fc\u30b6\u30af\u30ea\u30c3\u30af\u306e\u307f\u3092\u98db\u3070\u3057\u305f\u3044\u5834\u5408\u3001 \u4e0b\u8a18\u306e\u3088\u3046\u306b\u3059\u308b\u3068\u3044\u3044\u3088\u3046\u3067\u3059\u3002 &lt;pre&gt;&lt;code&gt;mWebView.setWebViewClient(new We &hellip; <a href=\"https:\/\/www.ecoop.net\/memo\/archives\/the-way-for-shouldoverrideurlloading-to-determine-catching-a-redirect-in-a-webview.html\" class=\"more-link\">\u7d9a\u304d\u3092\u8aad\u3080 <span class=\"screen-reader-text\">WebView\u306eshouldOverrideUrlLoading()\u5185\u3067\u30ea\u30c0\u30a4\u30ec\u30af\u30c8\u5224\u5b9a<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[85],"tags":[65],"class_list":["post-974","post","type-post","status-publish","format-standard","hentry","category-android-dev","tag-android"],"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts\/974","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/comments?post=974"}],"version-history":[{"count":0,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/posts\/974\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/media?parent=974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/categories?post=974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.ecoop.net\/memo\/wp-json\/wp\/v2\/tags?post=974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}