title: How to get complete screen size of device programmatically in android?
body: <p>I am calculating the screen size of device programmatically for Tablet nexus7" , its giving 6.7 .But Nexus7" have screen size 7".
  I want to get the complete screen size of device.
  here is my code:-</p>
  
  <pre><code>DisplayMetrics dm = new DisplayMetrics();
          getActivity().getWindowManager().getDefaultDisplay().getMetrics(dm);
          double x = Math.pow(dm.widthPixels / dm.xdpi, 2);
          double y = Math.pow(dm.heightPixels / dm.ydpi, 2);
          screenInches = Math.sqrt(x + y);
  </code></pre>