title: How to get dialog size?
body: <p>I am looking for a way to get size of a custom dialog. I went through <a href="https://stackoverflow.com/questions/11392334/how-to-get-size-of-a-custom-dialog-in-android">this</a> question, but the only answer given is pretty useless, because if I try <code>mDialog.getWindow().getAttributes().height;</code> it only returns -2, which is a constant for <code>WRAP_CONTENT</code> attribute which I set to dialog. How can I get the size of it. I want to know the siye for the background image.</p>