How does Android globalize dialog?

how can I make dialog global so that all activity can be used?

I put dialog initialization in the parent class, but I get an error:
android.view.WindowManager$BadTokenException: Unable to add window-- token android.os.BinderProxy@978279 is not valid; is your activity running?


I don't know what this means. Even if someone does offer such a thing on github.

Portal: tangxianming/global-dialog

p.s. Dialog and AlertDialog have various limitations, but there are many ways to meet the requirements.


from the Log message,
I speculate that you did not create (in onCreate) and destroy (in onDestroy) correctly in BaseActivity.

Menu