Java tutorial
//package com.java2s; import android.content.Context; import android.widget.Toast; public class Main { public static Toast mToast; public static void showTips(Context context, String text) { if (mToast == null) { mToast = Toast.makeText(context, "", Toast.LENGTH_LONG); } mToast.setText(text); mToast.show(); } }