Google News
logo
Android - Interview Questions
What is a Toast? Write its syntax.
* Toast notification is a message that pops up on the window.
* It only covers the expanse of space required for the message and the user’s recent activity remains visible and interactive.
* The notification automatically fades in and out and does not accept interaction events.
 
Syntax :

Toast.makeText(ProjectActivity.this, "Your message here", Toast.LENGTH_LONG).show();

Advertisement