意图为长期的EditText preSS [英] Intents for EditText LongPress

查看:121
本文介绍了意图为长期的EditText preSS的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想我的应用程序可以看出,当上编辑文本,用户长presses复制或粘贴。 或者点击复制或粘贴。

i want my application to be seen when a user long presses on edit text to copy or paste. or clicks on copy or paste.

我试着用不同的意图,比如

i tried with different intents like

ACTION_PASTE, ACTION_EDIT

ACTION_PASTE , ACTION_EDIT

但没有一个是为我工作!

But none are working for me !!

请帮我出 先谢谢了。

推荐答案

有没有方法可以让你自动出现在,当用户选择了的EditText <文本显示的操作模式或上下文菜单/ code>其他应用程序。

There is no way for you to automatically appear in the action mode or context menu that appears when the user selects text in an EditText for other applications.

有关您的的EditText 窗口小部件,您可以<一href="http://developer.android.com/reference/android/widget/TextView.html#setCustomSelectionActionModeCallback%28android.view.ActionMode.Callback%29"相对=nofollow>使用 setCustomSelectionActionModeCallback() 将项目添加到标准操作模式API级别11 +。

For your own EditText widgets, you can use setCustomSelectionActionModeCallback() to add items to the standard action mode on API Level 11+.

这篇关于意图为长期的EditText preSS的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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