用警告对话框(AlertDialog)选择条目
?
????????
??? /* 选择几个文件时,弹出要处理文件的ListDialog */
??? String[] menu={"打开文件","更改文件名","删除文件"};
??? new AlertDialog.Builder(EX05_15.this)
??????? .setTitle("你要做甚么?")
??????? .setItems(menu,d)?/* menu 就是要显示的选择项, d 是 针对不同的选项的处理接口(DialogInterface.OnClickListener)*/
??????? .setPositiveButton("取消", new DialogInterface.OnClickListener()
??????? {
????????? public void onClick(DialogInterface dialog, int which)
????????? {
????????? }
??????? })
??????? .show();