监听剪贴板内容的变化? [英] Listener for clipboard content change?

查看:1093
本文介绍了监听剪贴板内容的变化?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有没有办法注册的方法,这样它会自动为用户结束文本选择模式(从而复制到剪贴板)?尽快名为

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屋!

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