title: Not able to get the correct size of the screen in android 2.3?
body: <p>I am trying to get the size of the screen. The size I have set for emulator is 540 x 960 but what I am getting is 320 x 480. Any suggestions on it to get the right size. Here is the code;</p>
  
  <pre><code>DisplayMetrics dm = new DisplayMetrics();
  getWindowManager().getDefaultDisplay().getMetrics(dm);
  width = dm.widthPixels;
  height = dm.heightPixels;
  </code></pre>