title: NoSuchMethodError: getSize
body: <p>I have the following code to find the size of the screen:</p>
  
  <pre><code>WindowManager wm = (WindowManager) this.getSystemService(Context.WINDOW_SERVICE);
      Point size = new Point();
      int measuredWidth = 0;
      int measuredHeight = 0;
  
      if (Build.VERSION.SDK_INT &gt;= Build.VERSION_CODES.HONEYCOMB) {
          wm.getDefaultDisplay().getSize(size);
  
          measuredWidth = size.x;
          measuredHeight = size.y;
      } else {
          Display display = wm.getDefaultDisplay();
  
          measuredWidth = display.getWidth();
          measuredHeight = display.getHeight();
      }
  </code></pre>
  
  <p>On a galaxy gio (2.3.6) this works, but on a galaxy tab 10.1 (3.0) this crashes.</p>
  
  <pre><code>wm.getDefaultDisplay().getSize(size);
  </code></pre>
  
  <p>On this line I get </p>
  
  <blockquote>
    <p>NoSuchMethodError: android.view.Display.getSize.</p>
  </blockquote>
  
  <p>How can I fix this? </p>