How to get screen width and height in motorola milestone, android
<p>I have used the followng ways to get screen width and height. When I run my application in motorola I got width= 320pixel and height = 533 pixel. But size of motorla milestone is 480 x 854 pixels. How to get height as 854 and width as 480
see <a href="http://www.gsmarena.com/motorola_milestone-3001.php" rel="nofollow">http://www.gsmarena.com/motorola_milestone-3001.php</a></p>

<pre><code>Display display = getWindowManager().getDefaultDisplay(); 
        int width = display.getWidth();
        int height = display.getHeight();

        DisplayMetrics metrics = new DisplayMetrics();
        getWindowManager().getDefaultDisplay().getMetrics(metrics);

        int heightOfScreen = metrics.heightPixels;
        int widthOfScreen = metrics.widthPixels;
        System.out.println("...w1..."+width+"...h1..."+height+"....w2...."+widthOfScreen+"...h2..."+heightOfScreen);
</code></pre>

<p><strong>Output</strong>
 ...w1...320...h1...533....w2....320...h2...533</p>
