Disable Automatic Linking of Mailing Address in WebView

梦想的初衷 提交于 2019-12-07 17:53:50

问题


The android WebView will automatically detect a mailing address in the html and allow you to click on it to launch a map. Is there anyway to disable this without a native code change? Can I add something to the html markup or cancel a javascript event to prevent this from happening?

If I need to make this change in native code, how is that done?

EDIT: When I say mailing address, I mean a physical street address, like:

123 Main Street Sometown, CA 12345


回答1:


You might want to try using the following meta tag in the page you're including in the WebView, if that's possible.

<meta name="format-detection" content="address=no" />

Source: http://phpaul.wordpress.com/2011/01/14/writing-a-webpage-for-a-mobile-device/



来源:https://stackoverflow.com/questions/7771687/disable-automatic-linking-of-mailing-address-in-webview

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!