// 3.O以后和3.0以前,复制到剪贴板的方法不一致 if (DevUtil.hasHoneycomb()) { ClipboardManager copy = (ClipboardManager) mContext.getSystemService(Context.CLIPBOARD_SERVICE); copy.setPrimaryClip(ClipData.newPlainText("url", content)); } else { android.text.ClipboardManager copy = (android.text.ClipboardManager) mContext .getSystemService(Context.CLIPBOARD_SERVICE); copy.setText(content); } showToast(mContext.getString(R.string.pub_share_platform_copy_url_success));