Last active
August 5, 2016 04:59
-
-
Save 64lines/e0f82b9ebee4879b4ff4a547e0a49ede to your computer and use it in GitHub Desktop.
Show Toast Alert with Android
This file contains hidden or 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
| private void showAlert(String text, int duration) { | |
| Context context = getApplicationContext(); | |
| Toast toast = Toast.makeText(context, text, duration); | |
| toast.show(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment