title: Android get Screen Size deprecated?
body: <p>Hey I need to get the width of the screen in my application. The application will run on 2.1 and upwards. I have set it up like the one below. The method is deprecated and i should proabably use getSize or a other way. But the question is: Will this work on android versions like 3.0+ and 4.0+, or will it make the app crash. I have used a deprecated method in a thread before and it made the app crash on ice cream devices. Will the method below work ?</p>
  
  <pre><code> Display display = getWindowManager().getDefaultDisplay(); 
       int width = display.getWidth();
       int height = display.getHeight();
  </code></pre>
  
  <p>EDIT:</p>
  
  <p>I have tried the getSize but i dont get it to work:</p>
  
  <pre><code>  Display display = getWindowManager().getDefaultDisplay();
        Point size = new Point();
        display.getSize(size);
        int width = size.x;
        int height = size.y;
  </code></pre>