意图为长期的EditText preSS意图、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 pa...

我想我的应用程序可以看出,当上编辑文本,用户长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 其他应用程序。

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 窗口小部件,您可以使用 setCustomSelectionActionModeCallback() 将项目添加到标准操作模式API级别11 +。

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