How can I get the exact screen size of the device through code?
<p>I used the below code to find out the screen size but I am not getting correct values.</p>

<pre><code>Display display = ((WindowManager) getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay();
    int width = display.getWidth(); 
    int height=display.getHeight();
</code></pre>

<p>It returns 320 x 480 for galaxy tab.. which is not correct.</p>

<p>How do I find the correct screen size of the galaxy tab which is 600 x 1024.</p>
