Android examples for User Interface:Toast
Display Toast with the input message
//package com.java2s; import android.app.Activity; import android.widget.Toast; public class Main { /**// w w w.j a v a 2s . com * Display Toast with the input message * @param activity - {@link Activity} instance * @param message - Message to be displayed in Toast */ public static void showToast(Activity activity, String message) { Toast.makeText(activity, message, Toast.LENGTH_LONG).show(); } }