Here you can find the source of showMessageDialog(Context context, String title, String strText)
public static void showMessageDialog(Context context, String title, String strText)
//package com.java2s; import android.app.AlertDialog; import android.content.Context; import android.content.DialogInterface; public class Main { public static void showMessageDialog(Context context, String title, String strText) {/*from w ww.j a v a 2s . c o m*/ AlertDialog.Builder builder = new AlertDialog.Builder(context); builder.setTitle(title); builder.setMessage(strText); 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 } }