Android Copy and Paste with TextView

2019-04-07 22:59发布

问题:

I have a textview which displays a lot of text.

My users want to highlight and copy a snip of code to the clipboard.

Any pointers on how to do that?

回答1:

Have you tried Copy Paste - Android Developers Site?



回答2:

Modify the textIsSelectable property:

android:textIsSelectable="true"