final CharSequence[] items = {"Now", "Later", "Cancel"}; AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("When you need to Take BackUp?"); builder.setSingleChoiceItems(items, -1, new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int item) { // Toast.makeText(getApplicationContext(),items[item],Toast.LENGTH_SHORT).show(); items[0].notify(); items[1].charAt(2); } }); builder.show(); 此对话框可以完成一些功能,怎样声明和定义对话框对象呢?
桃花长相依
智慧大石