监听剪贴板内容的变化? [英] Listener for clipboard content change?
问题描述
有没有办法注册的方法,这样它会自动为用户结束文本选择模式(从而复制到剪贴板)?尽快名为
Is there a way to register a method so that it's automatically called as soon as the user ends "text selection mode" (thereby copying selection to clipboard)?
推荐答案
我想你要找的<一个href="http://developer.android.com/reference/android/content/ClipboardManager.html#addPrimaryClipChangedListener%28android.content.ClipboardManager.OnPrimaryClipChangedListener%29">ClipboardManager.addPrimaryClipChangedListener().
修改 - 这是为Android 3.0,我没有看到任何其他剪贴板相关的API的同期水平
Edit - this is for Android 3.0, and I don't see any other clipboard-related apis in the earlier levels.
另请参见<一href="http://developer.android.com/guide/topics/clipboard/copy-paste.html#ClipboardManager">ClipboardManager文档中复制和粘贴指南。
Also see the ClipboardManager docs in the copy and paste guide.
这篇关于监听剪贴板内容的变化?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!