Displays a long Toast wherever the method is called. - Android User Interface

Android examples for User Interface:Toast

Description

Displays a long Toast wherever the method is called.

Demo Code


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

public class Main {
  /**//from  w  ww.  j  av  a  2s. c o  m
   * Displays a long Toast wherever the method is called.
   * 
   * @param mContext
   *          application context.
   * @param message
   *          your message.
   */
  public static void longToast(Context mContext, String message) {
    Toast.makeText(mContext, message, Toast.LENGTH_LONG).show();
  }
}

Related Tutorials