Created
May 9, 2016 19:27
-
-
Save VassilisPallas/65ef509592f06baad929a9e058e31dae to your computer and use it in GitHub Desktop.
copy selected text from Edittext on Android
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ClipboardManager clipboard = (ClipboardManager) getSystemService(CLIPBOARD_SERVICE); | |
ClipData clip = ClipData.newPlainText(label, text); | |
clipboard.setPrimaryClip(clip); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment