之後雖然學習Android應用中,我創建了這個對話框中使用對話框:創建另一個對話框,對話框的Android
dialogBuilder = new AlertDialog.Builder(this);
dialogBuilder.setTitle("Title");
dialogBuilder.setPositiveButton("Next", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Toast.makeText(getApplicationContext(), "Next dialog", Toast.LENGTH_LONG).show();
}
});
dialogBuilder.setNegativeButton("Cancel", new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialog, int which) {
Toast.makeText(getApplicationContext(), "Canceled", Toast.LENGTH_LONG).show();
}
});
AlertDialog dialog = dialogBuilder.create();
dialog.show();
如何創建「下一步」被按下後立即出現另一個對話框?我已閱讀this後,但我不明白在那裏回答的代碼。
或者你可以寫裏面positivebutton完整的ShowDialog的onclick – Redman