2016-07-15 69 views

回答

2

保持所有對話框的引用並在最後一次對話框中點擊它們。

AlertDialog dialog1 = new AlertDialog.Builder().build(); 

AlertDialog dialog2 = new AlertDialog.Builder().build(); 

AlertDialog dialog3 = new AlertDialog.Builder() 
      .setPositiveButton("Close", new DialogInterface.OnClickListener() { 
       public void onClick(DialogInterface dialog, int id) { 
        // if this button is clicked, 
        // dismiss all dialogs 
        dialog1.dismiss(); 
        dialog2.dismiss(); 
        dialog3.dismiss(); 
       } 
       }).build(); 
相關問題