Android WebView : disable geo: for addresses
In my Android application, I am using a WebView to render a list of locations. For some reason, when I click on a list item, it interprets it as a "geo:" address and opens the default browser to show the location. How can I configure the WebView to not interprete the location's addresses.
I don't want the "geo:" handling to swallow the "normal" list item touch event. If I tap carefully just on the location name then the "normal" list item touch event is fired. The WevView must interprete addresses automatically, since I don't add the "geo:" markup.
Sample content:
Southport Open Storage
3080 Promenade St, West Sacramento, CA 95691, USA
Sample content html:
<li class="ui-li ui-li-static ui-body-c">
<span class="location-address-name">D And L Heating And Air - HVAC Contractor</span><br>
<span class="location-formatted-address">3236 开发者_开发问答Malcolm Island St, West Sacramento, CA 95691, USA</span>
</li>
Additional Info:
- Using jQueryMobile 1.0-b2 to for all UI components
- jQuery 1.6.2
I saw some posts about "geo:" but they mostly dealt with WebViewClient.shouldOverrideUrlLoading(...) which seems no relevant to the above issue.
Looks like you want to add this to your <head>
:
<meta name="format-detection" content="address=no" />
See also this similar question:
- Disable the automatic Linkify of Webview
精彩评论