final CharSequence [] items = {"Foo", "Bar", "Baz"};
AlertDialog.Builder builder = new AlertDialog.Builder(this);
builder.setTitle("Make your selection");
builder.setItems(items, new DialogInterface.OnClickListener() {
public void onClick(DialogInterface dialog, int item) {
// Do something...
}
});
AlertDialog alert = builder.create();
alert.show();