Elad Benda Elad Benda - 7 months ago 57
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.