List of utility methods to do Clipboard Paste
String | paste(Context context) paste ClipboardManager cmb = (ClipboardManager) context
.getSystemService(Context.CLIPBOARD_SERVICE);
return cmb.getText().toString().trim();
|
void | copyStringToClipboard(Context context, String string, int toastText) copy String To Clipboard ClipboardManager clipboardManager = (ClipboardManager) context
.getSystemService(Context.CLIPBOARD_SERVICE);
clipboardManager.setPrimaryClip(ClipData.newPlainText("", string));
Toast.makeText(context, toastText, Toast.LENGTH_SHORT).show();
|
String | getClipboard(Context context) get Clipboard android.text.ClipboardManager clipboard = (android.text.ClipboardManager) context
.getSystemService(Context.CLIPBOARD_SERVICE);
return clipboard.getText().toString();
|
String | paste(Context context) paste ClipboardManager cmb = (ClipboardManager) context
.getSystemService(Context.CLIPBOARD_SERVICE);
return cmb.getText().toString().trim();
|
String | pasteText(Context context) paste Text android.text.ClipboardManager clipboard = (android.text.ClipboardManager) context .getSystemService(Context.CLIPBOARD_SERVICE); if (clipboard.hasText()) { return clipboard.getText().toString(); return ""; |