Posted By

variable3 on 04/27/11


Tagged

dialog toast


Versions (?)

Android dialog


 / Published in: Java
 

  1. AlertDialog.Builder alertbox = new AlertDialog.Builder(ActivityA.this);
  2. alertbox.setTitle("Demo");
  3. alertbox.setMessage(message);
  4. alertbox.setPositiveButton("okay/Exit/Cancel",
  5. new DialogInterface.OnClickListener() { public void onClick(DialogInterface dialog, int id) {
  6. Intent intent=new Intent(current context, newActivity);
  7. startActivity(intent);
  8. //finish();
  9. }
  10. });
  11. alertbox.show();

Report this snippet  

You need to login to post a comment.