Intents for EditText LongPress

随声附和 提交于 2019-12-25 00:35:55

问题


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

But none are working for me !!

Please help me out Thanks in advance.


回答1:


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.

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



来源:https://stackoverflow.com/questions/24433399/intents-for-edittext-longpress

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!