Android AlertDialog Create showAuthenticatedDialog(Context context, String title, String text)

Here you can find the source of showAuthenticatedDialog(Context context, String title, String text)

Description

show Authenticated Dialog

Declaration

public static void showAuthenticatedDialog(Context context,
            String title, String text) 

Method Source Code

//package com.java2s;

import android.app.AlertDialog;

import android.content.Context;
import android.content.DialogInterface;

public class Main {
    public static void showAuthenticatedDialog(Context context,
            String title, String text) {

        AlertDialog.Builder builder = new AlertDialog.Builder(context);
        builder.setTitle(title);//from   ww w.  ja v a 2  s  . co m
        builder.setMessage(text);

        builder.setNeutralButton("OK",
                new DialogInterface.OnClickListener() {
                    @Override
                    public void onClick(DialogInterface arg0, int arg1) {
                        // TODO Auto-generated method stub
                        // Toast.makeText(getActivity(), "Close is clicked", Toast.LENGTH_LONG).show();

                    }
                });
        builder.show(); // To show the AlertDialog
    }
}

Related

  1. showAlertDialog(Context context, String title, String message)
  2. manageAlertDialog( final Activity fourerrActivity, final String dialogTitle, final String dialogMessage)
  3. showAlertDialog(Context context, String title, String message, String btnString, DialogInterface.OnClickListener onClickListener)
  4. newYesNoDialog(final Context context, String dialogTitle, String screenMessage, int iconResourceId, OnClickListener listener)
  5. newMessageDialog(final Context context, String dialogTitle, String screenMessage, int iconResourceId)
  6. showMessageDialog(Context context, String title, String strText)
  7. showSingleDialog(Context context, String title, String msg, boolean cancelable)
  8. getInstallationDialog(final Context context)
  9. showDialog(Context context, String title, String message)