HOW TO CREATE TOAST FOR YOUR ANDROID APPS :

  1. Make function that showing toast in YourActivity.java
  2. Toast syntax :

    Toast toastname = Toast.makeText(getApplicationContext(),text,Toast.LENGTH_LONG/SHORT); 

    The text (parameter) is in string format. The length is used to set how long the toast will be showing on the screen.

  3. To show toast on the screen, use show() method to toast object.
  4. Call the function in your UI (activity_main.xml).