Android AlertDialog Create showAlertDialog(Activity ctx, String title, String text)

Here you can find the source of showAlertDialog(Activity ctx, String title, String text)

Description

show Alert Dialog

Declaration

public static final void showAlertDialog(Activity ctx, String title,
            String text) 

Method Source Code

//package com.java2s;
import android.app.Activity;
import android.app.AlertDialog;

public class Main {
    public static final void showAlertDialog(Activity ctx, String title,
            String text) {//from   w w w.  j  a  v a  2 s . c  om
        AlertDialog.Builder alertBuilder = new AlertDialog.Builder(ctx);
        alertBuilder.setTitle(title);
        alertBuilder.setMessage(text);
        AlertDialog alert = alertBuilder.create();
        alert.show();
    }
}

Related

  1. showAlertText(String alertText, Context context)
  2. showInfoDialog(Context context, String message, String titleStr, String positiveStr, DialogInterface.OnClickListener onClickListener)
  3. alert(Context act, String msg)
  4. alert(Context act, int strId)
  5. showErrorDialog(Context context, int title, int message)
  6. createAlertDialog(Context cx, String title, String message)
  7. alert(String title, String message, Context context)
  8. alert(String title, String message, Context context, boolean linksClickable)
  9. confirm(String title, String message, Context context, DialogInterface.OnClickListener onConfirmListener)