Android AlertDialog Create simpleDialogBox(Context context, String message)

Here you can find the source of simpleDialogBox(Context context, String message)

Description

simple Dialog Box

Declaration

public static void simpleDialogBox(Context context, String message) 

Method Source Code

//package com.java2s;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.content.DialogInterface.OnClickListener;

public class Main {
    public static void simpleDialogBox(Context context, String message) {
        AlertDialog.Builder alertBuilder = new AlertDialog.Builder(context);
        alertBuilder.setTitle("Photo Cache").setMessage(message)
                .setCancelable(true)//from  www . java2s . c  om
                .setPositiveButton("Okay", new OnClickListener() {
                    @Override
                    public void onClick(DialogInterface dialog, int which) {
                        dialog.dismiss();

                    }
                });

        AlertDialog alertDialog = alertBuilder.create();
        alertDialog.show();
    }
}

Related

  1. showMessageDialog(Context context, String title, String strText)
  2. showSingleDialog(Context context, String title, String msg, boolean cancelable)
  3. getInstallationDialog(final Context context)
  4. showDialog(Context context, String title, String message)
  5. makeDialogBox(Context context, String title, String message, String cancleButton, DialogInterface.OnClickListener cancelCallBack, String okayButton, DialogInterface.OnClickListener okayCallBack)
  6. dismissProgressBar(ProgressDialog progressBar)
  7. showConnectionErrorDialog(Context c)
  8. showInfoDialog(String text, final Context context)
  9. makeSimpleDialog(Activity activity, String text)