Java tutorial
//package com.java2s; import android.content.Context; import android.widget.Toast; public class Main { /** * @param message */ public static void showToast(int message, Toast mToast, Context context) { if (mToast == null) { mToast = Toast.makeText(context, "", Toast.LENGTH_SHORT); } mToast.setText(context.getString(message)); mToast.show(); } }