Java tutorial
//package com.java2s; import android.content.Context; import android.view.Gravity; import android.widget.Toast; public class Main { private static Toast toast; public static void showTextToast(Context context, String msg) { if (toast == null) { toast = Toast.makeText(context, msg, Toast.LENGTH_SHORT); } else { toast.setText(msg); } toast.setGravity(Gravity.BOTTOM, 0, 0); toast.show(); } }