avast / android-styled-dialogs

Backport of Material dialogs with easy-to-use API based on DialogFragment
Apache License 2.0
2.15k stars 450 forks source link

How can I react on (Close) button press for dialogs with a title, message and Close button? #79

Closed dannysunyu closed 9 years ago

dannysunyu commented 9 years ago

Hello Developers, Can I react on (Close) button press for dialogs with a title, message and Close button? If so, how?

SimpleDialogFragment.createBuilder(this, getSupportFragmentManager()).setTitle(R.string.title).setMessage(R.string.message).setRequestCode(xxx).show();

The onCancelled(int requestCode) won't be called for the Activity that implements ISimpleDialogCancelListener.

Thanks.

dannysunyu commented 9 years ago

I found out the way myself.