限制剪切/复制和Android的应用程序之间粘贴 [英] Restrict cut/copy and paste between applications in android

查看:336
本文介绍了限制剪切/复制和Android的应用程序之间粘贴的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要限制的程序剪切/复制在应用程序内粘贴应用程序之外。然而,我必须能够在我的应用程序进行剪切/复制和粘贴带。如何实现这一点?

我面临的问题是,一旦我出来的应用程序我尝试将其粘贴不粘贴任何东西,但如果我打开剪贴板,然后我可以看到我的全部储存在我的剪辑板从我的应用程序的项目。


解决方案

  

我如何实现这一点?


您不要使用剪贴板。剪贴板是一个设备级的系统服务。任何你放在那里将提供给其他应用程序。

欢迎您来创建自己的剪贴板构建你的应用程序内尝试使用它。这会不会是完全可靠的,只要你将无法控制的EditText 的行为,并在所有设备上的系统剪贴板,但可能会或可能不会是在特定区域的关注。

I want to restrict the procedure cut/copy inside the application and paste outside the application. However i must be able to cut/copy and paste with in my application. How do i implement this?

The problem i am facing is once i come out of the application i try to paste it doesn't paste anything but if i open clip board then i can see all the items i have stored in my clip board from my application.

解决方案

How do i implement this?

You don't use the clipboard. The clipboard is a device-wide system service. Anything you put there will be available to other applications.

You are welcome to create your own "clipboard" construct inside your app and attempt to use it. This will not be completely reliable, insofar as you will be unable to control the behavior of EditText and the system clipboard on all devices, but that may or may not be your particular area of concern.

这篇关于限制剪切/复制和Android的应用程序之间粘贴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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