I want to implement the cut,copy, paste functionality in my EditText,i tried with the following code :
ClipMan = (ClipboardManager) getSystemService(Context.CLIPBOARD_SERVICE);
editbox1.setText(ClipMan.getText());
for paste the text,but it paste the whole text in another Editbox..I want to copy the selected text and paste that text in the same Editbox just like the normal notepad works..
Any suggestions are greatly appreciated... Thanks !!
Finally i am able to copy ,paste in my application..now i can paste only selected text by using this code :
to copy the selected text :
to paste the selected text:
we can do this way :
for copy data
and get data which was copied
in your case you can use
EditText.getText()
instead ofValue
.. andEditText.setText(pasteData);
for paste that data.