Here you can find the source of showAuthenticatedDialog(Context context, String title, String text)
public static void showAuthenticatedDialog(Context context, String title, String text)
//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 } }