Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Click events #6

Closed
ghost opened this issue Aug 20, 2014 · 2 comments
Closed

Click events #6

ghost opened this issue Aug 20, 2014 · 2 comments

Comments

@ghost
Copy link

ghost commented Aug 20, 2014

I'm new to this so how exactly to handle click events for CustomDialogs. I have 3 dialogs and if I implement CustomDialog.ClickListener and then onConfirmClick() & onCancelClick(), all confirm and cancel buttons from all dialogs use the same method & functionality..

@ghost
Copy link
Author

ghost commented Aug 20, 2014

Nevermind, I found a workaround. onConfirmClick() && onCancelClick() before doing stuff, check if the dialog isn't null and it's visible. Do this for all dialogs and it will work perfectly.

public void onConfirmClick(){
        if(customDialog !=null && customDialog.isShowing()){
                 //Do stuff...
        }
}

@lewisjdeane
Copy link
Owner

Just use the built in method .setClickListener(new CustomDialog.ClickListener(){....}); as mentioned in the read me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant