标签:cli rdm article sys var kotlin prim systems context
//将数据转换为ClipData类
var str:ClipData=ClipData.newPlainText("Label",myArticle.text)
//构造一个ClipboardManager类,也就是剪切板管理器类
var cm:ClipboardManager= getSystemService(Context.CLIPBOARD_SERVICE) as ClipboardManager
//最后将数据复制到系统剪切板上
cm.setPrimaryClip(str)
标签:cli rdm article sys var kotlin prim systems context
原文地址:https://www.cnblogs.com/wang2804355025/p/12701403.html