public class AndroidCopynPaste extends Activity {
 /** Called when the activity is first created. */
 @Override
 public void onCreate(Bundle savedInstanceState) {
     super.onCreate(savedInstanceState);
     setContentView(R.layout.main);
  
     final EditText src = (EditText)findViewById(R.id.src);
     final TextView dest = (TextView)findViewById(R.id.dest);
     Button copynPaste = (Button)findViewById(R.id.copynpaste);
  
     final ClipboardManager clipBoard = (ClipboardManager)getSystemService(CLIPBOARD_SERVICE);
  
     copynPaste.setOnClickListener(new Button.OnClickListener(){

   @Override
   public void onClick(View v) {
    // TODO Auto-generated method stub
    clipBoard.setText(src.getText());
    dest.setText(clipBoard.getText());
    
   }});
 }
}