1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
AlertDialog.Builder builder = new AlertDialog.Builder(this); builder.setTitle("登録しました"); builder.setNegativeButton("OK", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // 遷移 Intent intent = new Intent(getApplication(), testActivity.class); startActivity(intent); } }); // 表示 builder.create().show(); |
これでウインドメッセージが出てきます。
“OK” を押した場合は、
1 2 3 4 5 6 7 8 9 10 |
builder.setNegativeButton("OK", new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialog, int which) { // 遷移 Intent intent = new Intent(getApplication(), G_2_0_4_SeijinshikiActivity.class); startActivity(intent); } }); |
この中にかくといいよ!
でもダイアログ以外をおしたときは、どう判定すればいいのか、、、、