I'm moving pieces of my app into a library module for code sharing. From what I've read you can put anything and everything in a library, but I'm suddenly getting WindowLeaked errors any time I try to open a dialog from the library code. I didn't find anything on the web about it. Does anyone know if there's something different you need to do to open dialogs from a library module, or if it just isn't supported? For example, because someone always wants to see code:
AlertDialog.Builder builder = new AlertDialog.Builder(context);
// ...set up the dialog...
final AlertDialog alert = builder.create();
alert.show();