Displays a short toast wherever the method is called. - Android User Interface

Android examples for User Interface:Toast

Description

Displays a short toast wherever the method is called.

Demo Code


import android.content.Context;
import android.widget.Toast;

public class Main {
  /**/*from w w w  .ja  va2  s .co m*/
   * Displays a short toast wherever the method is called.
   *
   * @param mContext
   *          application context.
   * @param message
   *          your message.
   */
  public static void shortToast(Context mContext, String message) {
    Toast.makeText(mContext, message, Toast.LENGTH_SHORT).show();
  }
}

Related Tutorials