How to Copy Text to Clip Board in Android?

Can anybody please tell me how to copy the text present in a particular textview to clipboard when a button is pressed? @Override protected void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.mainpage); textView = (TextView) findViewById(R.id.textview); copyText = (Button) findViewById(R.id.bCopy); copyText.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { // TODO Auto-generated method stub ClipboardManager clipboard = … Read more