意图为长期的EditText preSS [英] Intents for EditText LongPress
问题描述
我想我的应用程序可以看出,当上编辑文本,用户长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屋!