Java tutorial
//package com.java2s; import android.app.Activity; import android.app.AlertDialog; import android.content.DialogInterface; import android.util.Log; public class Main { public static void openAbout(Activity a) { Log.d("about", "openAbout has been called"); //Log.d("context", "context = "+ c.toString()); AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(a); alertDialogBuilder.setTitle("About"); alertDialogBuilder.setMessage( "This app was developed for CS160 at UC Berkeley by:\n\nDominic Kong \nPatrick Lin \nMeghana Seshadri \nJane Sima") .setCancelable(true).setNeutralButton("Close", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { dialog.cancel(); } }); AlertDialog alertDialog = alertDialogBuilder.create(); alertDialog.show(); } }