Finding device resolution
<p>I have tried 2 approaches to find device dimensions (width and height):</p>

<ol>
<li><code>getWindowManager().getDefaultDisplay();</code></li>
<li><code>((WindowManager) getSystemService(WINDOW_SERVICE)).getDefaultDisplay();</code></li>
</ol>

<p>But both these approaches are not reliable because at times they give me wrong dimensions.  For HTC desire, which has 480x800 resolution, it would give me dimensions as 320x533, which are incorrect. Can someone please suggest a more reliable approach?</p>
