Android的WebView中:禁用地理:对于地址 [英] Android WebView : disable geo: for addresses

查看:174
本文介绍了Android的WebView中:禁用地理:对于地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Andr​​oid应用程序,我使用的WebView呈现的位置的列表。出于某种原因,当我点击一个列表项,这间$ P $点它作为地缘的地址并打开默认的浏览器显示的位置。如何配置为不跨preTE位置的地址的WebView。

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.

我不希望地缘处理吞下正常列表项触摸事件。如果我仔细挖掘只是在位置名称,然后在正常的列表项的触摸事件。该WevView必须自动间$ P $私人地址,因为我不添加地理:标记

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.

样的内容:

Southport Open Storage
3080 Promenade St, West Sacramento, CA 95691, USA

样内容的HTML:

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>

附加信息:


  • 使用jQueryMobile 1.0-B2为所有UI组件

  • 的jQuery 1.6.2

我看到一些帖子关于地缘,但他们大多是处理WebViewClient.shouldOverrideUrlLoading(...)这似乎没有相关的上述问题。

I saw some posts about "geo:" but they mostly dealt with WebViewClient.shouldOverrideUrlLoading(...) which seems no relevant to the above issue.

推荐答案

看起来像要添加到您的&LT; HEAD&GT;

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

这篇关于Android的WebView中:禁用地理:对于地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆