hai,
can i set an onclickListner for AlertDialog ?
Regards Aneesh
hai,
can i set an onclickListner for AlertDialog ?
Regards Aneesh
There are three types of button in AlertDialog: positive button, negative button and neutral button. You can set click listener for each of them. AlertDialog.Builder provides a easy way to create AlertDialog, and apis to let you set listeners for those three buttons which I just mentioned. These listeners must implements DialogInterface.OnClickListener
.
Following are three methods you can use to set listeners for dialog buttons: