Articles → Android → Toast in android

Toast in android






What is Toast?





Syntax


Toast.makeText(context,message, Duration).show();



Example


@Override
protected void onStart() {
  super.onStart();
  Toast.makeText(this, "Welcome to Toast Example", Toast.LENGTH_LONG).show();
}



Output



Click to Enlarge


Posted By  -  Karan Gupta
 
Posted On  -  Saturday, November 2, 2019

Query/Feedback


Your Email Id  
 
Subject 
 
Query/FeedbackCharacters remaining 250