I created the general class OkCancelDialog, which conveniently runs throughout the application through a static method:
static public void Prompt(String title, String message) { OkCancelDialog okcancelDialog = new OkCancelDialog(); okcancelDialog.showAlert(title, message); }
For various reasons, I need an onClick listener in activity, so in activity I have:
public void onClick(DialogInterface v, int buttonId) { if (buttonId == DialogInterface.BUTTON_POSITIVE) {
This works fine with one dialog box in the application, but now I want to add another OK / Cancel dialog handled by the same action. As far as I can tell, only one onClick()
can be defined for activity, so I'm not sure how to implement this.
Any suggestions or tips?
source share