Android AlertDialog Create showAlert(Context parent, String alert)

Here you can find the source of showAlert(Context parent, String alert)

Description

show Alert

Declaration

public static void showAlert(Context parent, String alert) 

Method Source Code

//package com.java2s;

import android.app.AlertDialog;
import android.content.Context;

public class Main {
    public static void showAlert(Context parent, String alert) {
        new AlertDialog.Builder(parent).setTitle("Error").setMessage(alert)
                .setNeutralButton("Close", null).show();
    }/*w  ww  . ja  v a2 s.c  o  m*/
}

Related

  1. showAlert(Activity activity, int titleStringId, int messageStringId)
  2. showAlert(Context context, int titleId, String message)
  3. showAlert(Context context, int titleId, String message, CharSequence positiveButtontxt, DialogInterface.OnClickListener positiveListener)
  4. showAlert(Context context, int titleId, int messageId)
  5. showAlert(Context context, int titleId, int messageId, CharSequence positiveButtontxt, DialogInterface.OnClickListener positiveListener, CharSequence negativeButtontxt, DialogInterface.OnClickListener negativeListener)
  6. showAlertText(String alertText, Context context)
  7. showInfoDialog(Context context, String message, String titleStr, String positiveStr, DialogInterface.OnClickListener onClickListener)
  8. alert(Context act, String msg)
  9. alert(Context act, int strId)