Elad Benda Elad Benda - 1 month ago 9x
Android Question

why is setOnShowListener never called?

Here is my code:

mDialog.setOnShowListener(new OnShowListener() {
public void onShow(DialogInterface dialog) {
//some code

The breakpoints shows that
//some code
is never called. Can you help me understand what is happening ?

It's API 8 and above (supported by my app)


I could be wrong but you should set the listener before you call show() on the Dialog.