Java tutorial
//package com.java2s; import android.content.Context; import android.widget.Toast; public class Main { /** * Show a long toast message. */ public static void showLongToast(Context context, String message) { showToast(context, message, Toast.LENGTH_LONG); } /** * Show a toast message. */ private static void showToast(Context context, String message, int length) { Toast.makeText(context, message, length).show(); } }