tags:

views:

1476

answers:

2

I'm building an Android app and I want to copy the text value of an EditText widget. It's possible for the user to press Menu+A then Menu+C to copy the value, but how would I do this programatically?

+11  A: 

http://code.google.com/android/reference/android/text/ClipboardManager.html

Use ClipBoardManager's setText method:

 ClipboardManager clipboard = 
      (ClipboardManager) getSystemService(CLIPBOARD_SERVICE); 

 clipboard.setText("Text to copy");
FlySwat
A: 

ClipboardManager

01