Utility method to show a short toast to the user. - Android User Interface

Android examples for User Interface:Toast

Description

Utility method to show a short toast to the user.

Demo Code


//package com.java2s;

import android.content.Context;

import android.widget.Toast;

public class Main {
    /**/*from w w  w  .  j  a va  2 s  . c o  m*/
     * Utility method to show a short toast to the user.
     *
     * @param context Current context of the application.
     * @param message Message to display to the user.
     */
    public static void showStandardToastShort(Context context,
            String message) {
        Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
    }
}

Related Tutorials