I have an alert dialog which contains a button. The button is defined in some XML and the layout is set using Dialog.setContentView().
The button has a listener class and I want to know how, if at all, I can access the dialog from the onClick(View v) method.
The reason for this is simply that I want to be able to dismiss the dialog - so if there's an easier/better way to do this then that would be useful to know!