Android Copy and Paste by onclick -


i new android developer. trying make software store password (such facebook password) of user. these stored , shown vertical list view.all these going properly.

but want when click on one(such facebook password) of passwords, copied automatically , pasted on next clicked edit text field(such facebook password field) , can pasted once. once user paste it, removed clipboard. don't know method or way remove copied data clipboard after pasting once user. please me.

password copy/paste not enabled security reasons.

if want onclick code, believe asked before... let me know if wrong.

check link.

import:

import android.content.clipboardmanager; 

in onclick:

clipboardmanager clipboard = (clipboardmanager)getsystemservice(clipboard_service);  clipdata clip = clipdata.newplaintext(label, text); clipboard.setprimaryclip(clip); 

Comments