Java tutorial
//package com.java2s; import android.content.Context; import android.text.TextUtils; import android.widget.Toast; public class Main { public static void toastLong(Context context, int message) { Toast.makeText(context, message, Toast.LENGTH_LONG).show(); } public static void toastLong(Context context, String message) { if (!TextUtils.isEmpty(message)) { Toast.makeText(context, message, Toast.LENGTH_LONG).show(); } } }