Created
December 22, 2019 19:40
-
-
Save juniorcesarabreu/95705cfacb6038c482acc11ab5662c1e to your computer and use it in GitHub Desktop.
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
// Gets a handle to the clipboard service. | |
ClipboardManager clipboard = (ClipboardManager) | |
getSystemService(Context.CLIPBOARD_SERVICE); | |
// Creates a new text clip to put on the clipboard | |
ClipData clip = ClipData.newPlainText("Área", textViewArea.getText()); | |
// Set the clipboard's primary clip. | |
if (clipboard != null) { | |
clipboard.setPrimaryClip(clip); | |
} | |
Toast.makeText(PlantaBaixaActivity.this, "Valor da Área copiado.", Toast.LENGTH_SHORT).show(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment