I want to set a cancel button in my ProgressDialog. Below is my code:
ProgressDialog
myDialog = new ProgressDialog(BaseScreen.this); myDialog.setMessage(\"Load
Make sure you call myDialog.setButton before calling myDialog.show(); Also you can use myDialog.setButton("Cancel", (DialogInterface.OnClickListener) null); if you only need to close the dialog on button click.
myDialog.setButton
myDialog.show();
myDialog.setButton("Cancel", (DialogInterface.OnClickListener) null);