如何禁用ANDROID的复制和过去文本function,以及在Phonegap应用程序屏幕上长时间按下的IOS

在这里输入图像说明 电话差距问题 –

如何禁用ANDROID的默认文本复制粘贴function,以及在Phonegap应用程序中长按屏幕后的IOS。

我提到了如何在jQuery Mobile(iOS)中禁用Anchor的默认行为 ,但这不是可行的解决scheme。 我想要在config.xml文件中的代码。

谢谢。

**Use below code:** <style type="text/css"> *:not(input):not(textarea) { -webkit-user-select: none; /* disable selection/Copy of UIWebView */ -webkit-touch-callout: none; /* disable the IOS popup when long-press on a link */ } </style> **If you want Disable only anchor button tag use this.** a {-webkit-user-select: none; /* disable selection/Copy of UIWebView */ -webkit-touch-callout: none; /* disable the IOS popup when long-press on a link */ } 

在MainActivity的主Activity上,在你正在做loadUrl(launchUrl); 粘贴后再创build方法

  super.appView.getView().setOnLongClickListener(new View.OnLongClickListener() { public boolean onLongClick(View v) { return true; } }); 

这将防止长按复制