ClipboardManager clipboardManager = (ClipboardManager) getActivity().getSystemService(Context.CLIPBOARD_SERVICE);
if (TextUtils.isEmpty(“需要复制的文字”)) {
} else {
clipboardManager.setText(“需要复制的文字”);
}
ClipboardManager clipboardManager = (ClipboardManager) getActivity().getSystemService(Context.CLIPBOARD_SERVICE);
if (TextUtils.isEmpty(“需要复制的文字”)) {
} else {
clipboardManager.setText(“需要复制的文字”);
}