Java tutorial
//package com.java2s; import android.content.Context; import android.widget.Toast; public class Main { private static Toast toast = null; public static void getShortToast(Context context, String hint) { if (toast == null) { toast = Toast.makeText(context, hint, Toast.LENGTH_SHORT); } else { toast.setText(hint); toast.setDuration(Toast.LENGTH_SHORT); } toast.show(); } }