![Toast Toast](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEit1Ab2BUkb7RkqAkV17ZV3eNvfexAI8tuKy0LDavKLBznpA6CnY2G3HZYHdE_8qQ98h4KzG4tEhkDNk2KBsnQMQCrWHUDbTEAZqq90Cp2-igcNX7coYCO4w1BMwYJkZ1l3KvGWHu2FcIOX/s200/Toast.png)
The simplest form to make a standard toast that just contains a text view, and show it for the specified duration.
Toast.makeText(HelloWorld.this, "I'm a Toast!", Toast.LENGTH_LONG).show();
where:
Context context - The context to use. Usually your Application or Activity object.
CharSequence text - The text to show. Can be formatted text.
int duration - How long to display the message. Either LENGTH_SHORT or LENGTH_LONG
No comments:
Post a Comment