androidtextviewclipboardmanager

How to call clipboard menu programmatically


Is there any way to select some text in textView (not all, but current word) and then open clipboard dialog programmatically?

enter image description here


Solution

  • If I was you I wouldn't rely on the clipboard tray. The clipboard tray behavior can change between devices. I suggest you to build an overlay tray that opens at the top or at the bottom of the activity when the user selects some text. You can then add the copy, share and select all option to that tray.