Java tutorial
//package com.java2s; //License from project: Open Source License import android.content.Context; import android.widget.Toast; public class Main { /** * General Purpose Toast*/ public static void showToast(Context context, String message) { Toast.makeText(context, message, Toast.LENGTH_LONG).show(); } /** * General Purpose Toast*/ public static void showToast(Context context, int resId) { Toast.makeText(context, resId, Toast.LENGTH_LONG).show(); } }