Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想通过单击此(复制标签按钮)将这些文本和过去复制到其他应用程序(如 WhatsApp twitter 等)到剪贴板我该怎么做是我的活动
您可以使用以下内容将某些内容复制到剪贴板:
ClipboardManager 剪贴板 = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE); ClipData clip = ClipData.newPlainText("一些标签", floatingTextButton.getText().toString()); 剪贴板.setPrimaryClip(clip);