Android Toast Create showToast(Activity activity, String message)

Here you can find the source of showToast(Activity activity, String message)

Description

show Toast

License

Open Source License

Declaration

public static void showToast(Activity activity, String message) 

Method Source Code

//package com.java2s;
//License from project: Open Source License 

import android.app.Activity;

import android.widget.Toast;

public class Main {
    public static void showToast(Activity activity, String message) {
        Toast.makeText(activity.getApplicationContext(), message,
                Toast.LENGTH_SHORT).show();
    }//  w  w  w  .j av  a2s .c om
}

Related

  1. showFailure(Activity activity, int id)
  2. showElapsed(long start, long end, Context ctx)
  3. formatToastDist(String message, int value, String unit)
  4. formatToastTemp(String message, int value, String unit)
  5. showMessage(final Activity activity, final String message)
  6. showToast(final Activity ctx, final String text, final int position, final boolean alive)
  7. makeToast(String msg, int length, Activity mainAct)
  8. displayToast(String message, Activity activity)
  9. showToast(Context context, String message)