我想自定义Web视图上下文菜单(打开,在新窗口中打开,保存,复制,复制链接..)(长按Web项或Web URL)
是否可以编辑android提供的全局上下文菜单(将新项添加到现有上下文菜单)?
答案 0 :(得分:0)
仅在此处假设,但您可能希望覆盖View.OnLongClickListener()
public class MyWebView extends WebView{
@Override
public boolean onLongClick(View v){
//your own code here
//return true if you want to prevent default behavior
//return super.onLongClick(v) if you want to force default behavior
}
}