【问题标题】:How to open context menu when long click a link in android webview?长按android webview中的链接时如何打开上下文菜单?
【发布时间】:2013-01-28 19:02:35
【问题描述】:

我想使用 webview 在 android 中实现一个浏览器。每当用户长按 webview 中的链接时,如何在 android webview 中打开上下文菜单?

【问题讨论】:

标签: android webview android-contextmenu


【解决方案1】:

onLongPress 中致电Activity.openContextMenu(View v)。这意味着让 MyWebView 保留对 Activity 的引用。

【讨论】:

  • 当我长按任意位置时,webview 现在只会显示一个上下文菜单。如何检测链接何时被长按?
猜你喜欢
  • 2015-02-08
  • 1970-01-01
  • 2014-05-04
  • 2022-11-13
  • 1970-01-01
  • 1970-01-01
  • 2015-03-09
  • 2011-03-25
  • 2011-03-13
相关资源
最近更新 更多