I want to enable copy paste in a TextView.
I found these very nice explanations in Android docs:
http://developer.android.com/guide/topics/clipboard/copy-paste.html
But it works only starting at version 11 – honeycomb!
I need something which also works for the majority of users at this point of time, means it has to work also for gingerbread, froyo and eclair.
What do I use?
Use the
ClipboardManagerfound in theandroid.textpackage. They moved it to a different package because they started supporting clipping things other than text, but for backwards compatibility you can still use it under the old name.You still wind up with stuff like:
Here is a sample project demonstrating this.