问题
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