Does anyone know how I can capture the click on the share button from EditText's copy / cut menu?
Asked
Active
Viewed 44 times
0
-
1Implement an `ACTION_SEND` activity responding to the `text/plain` MIME type, probably. – CommonsWare Jul 06 '17 at 23:44
-
Great! Thanks @CommonsWare! – Gustavo C. Souza Jul 07 '17 at 00:05
-
Is there another way? – Gustavo C. Souza Jul 07 '17 at 00:46
-
Not that I am aware of. When I choose that option, I get a chooser with the activities that I would expect for ACTION_SEND. – CommonsWare Jul 07 '17 at 00:53
-
But I want to launch an ad activity when I click on it. How to do this? – Gustavo C. Souza Jul 07 '17 at 01:05
-
I do not know what "an ad activity" is. I have no idea why any user would want "an ad activity" to be an option from the `EditText` share option. And I have no idea what is preventing you from writing your own activity with your own `
` to support `ACTION_SEND` for `text/plain`. – CommonsWare Jul 07 '17 at 11:14 -
I solved my problem using:[link](https://stackoverflow.com/questions/31668011/how-to-detect-the-paste-event-in-editext-of-the-application). I just created a custom EditText. – Gustavo C. Souza Jul 17 '17 at 14:24