Android Toast Create showMessage(final Activity activity, final String message)

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

Description

show Message

Declaration

static void showMessage(final Activity activity, final String message) 

Method Source Code

//package com.java2s;
import android.app.Activity;
import android.widget.Toast;

public class Main {
    static void showMessage(final Activity activity, final String message) {
        activity.runOnUiThread(new Runnable() {
            public void run() {
                Toast.makeText(activity, message, Toast.LENGTH_LONG).show();
            }//  w w w .ja v a  2 s .  c o  m
        });
    }
}

Related

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