title: How to get screen resolution of an android device using LIBGDX?
body: <p>I am working android game development and I am new in it.
  I want to develop a game which screen resolution free. It will be enough for me if i get to know that how to catch screen resolution of an android device using libgdx library.
  After some googling i read the following code on different sites, but it is not for libgdx.</p>
  
  <pre><code>DisplayMetrics displaymetrics = new DisplayMetrics();
  getWindowManager().getDefaultDisplay().getMetrics(displaymetrics);
  height = displaymetrics.heightPixels;
  width = displaymetrics.widthPixels;
  </code></pre>
  
  <p>Except this i also used technique given on the following website that used "OrthographicCamera" class for solving the problem, and didn't work for me either.</p>
  
  <p><a href="http://www.java-gaming.org/index.php?topic=25685.0" rel="nofollow noreferrer">http://www.java-gaming.org/index.php?topic=25685.0</a></p>
  
  <p>How can i get the screen resolution or any way to adjust screen resolution for my game.</p>