标签:copy ret ext void sys div color pre context
1 public class UtilClipBoard { 2 3 public static void copy(Context context,String text) { 4 ClipboardManager cmb = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE); 5 cmb.setText(text.trim()); 6 } 7 8 /** 9 * 实现粘贴功能 10 * 11 */ 12 public static String paste(Context context) { 13 ClipboardManager cmb = (ClipboardManager) context.getSystemService(Context.CLIPBOARD_SERVICE); 14 return cmb.getText().toString().trim(); 15 } 16 }
标签:copy ret ext void sys div color pre context
原文地址:http://www.cnblogs.com/hello-studio/p/7570164.html