본문 바로가기

Android

AlertDialog


          AlertDialog.Builder ad = new AlertDialog.Builder(context);
          ad.setTitle("공지사항");
          ad.setMessage("공지사항 내용입니다.");
//          ad.setIcon(R.drawable.question)
          ad.setPositiveButton("확  인",
               new DialogInterface.OnClickListener() {
                 public void onClick(DialogInterface dialog,
                     int whichButton) {
                 }
               });
          ad.setNegativeButton("확  인",
               new DialogInterface.OnClickListener() {
                 public void onClick(DialogInterface dialog,
                     int whichButton) {
                 }
               });
          ad.show();