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