AlertDialog
을 다른 AlertDialog
에 열려고하는데 작동하지 않습니다. 왜 작동하지 않는지 아이디어가 있습니까?AlertDialog.Builder가 다른 AlertDialog.Builder를 엽니 다.
String items[] = {"Details","Edit","Delete"}
AlertDialog.Builder alert = new AlertDialog.Builder(getAplicationContext());
alert.setTitle("Options");
alert.setItems(items, new OnClickListener() {
public void onClick(DialogInterface dialog, int item) {
switch(item){
case 0:
AlertDialog.Builder alert2 = new AlertDialog.Builder(getAplicationContext());
alert2.setTitle("Details");
alert2.setMessage(getDetails());
alert2.setNeutralButton("Close", null);
alert2.show();
return;
case 1:
//not important for the question
return;
case 2:
//not important for the question
return;
}
}
});
alert.setNegativeButton("Cancel", null);
alert.show();
"작동하지 않음"을 정의하십시오. 다른 AlertDialog에서 'AlertDialog'을 열려고 할 때 어떤 오류 메시지가 나타 납니까? – Rob