0

Is it possible to catch the global double-click events on text in Android? If so, how to do it? Should I get root right first?

To be more specifically, when I double-click the text area in the built-in apps, the text will be selected and it will pop a menu to operate on it.

enter image description here

However, in other apps, such behaviour will not occur. Hence, I would like to catch the global the double-click events and customize the pop-menu.

Any solutions or advices will be appreciated.


Edit:

I would like to catch double-click events in other apps, not in my apps. My apps is to make such event-catching possible.

chenzhongpu
  • 6,193
  • 8
  • 41
  • 79

1 Answers1

0

Yes, You have to set EditText android:textIsSelectable="true"

And create Action mode callback

for more info see this

Community
  • 1
  • 1
Zumry Mohamed
  • 9,318
  • 5
  • 46
  • 51