title: Android screen in different resolutions
body: <p>I want to develop an app which will support different screen sizes.</p>
  
  <p>I've read the <a href="http://developer.android.com/guide/practices/screens_support.html" rel="nofollow noreferrer">official guide</a> a lot of times, but I can not understand this.  I created a brand new app with a main activity, then I put a black square on the screen with 100dp x 100dp dimensions, just like this:</p>
  
  <p>res/layout/activity_main.xml:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      xmlns:tools="http://schemas.android.com/tools"
      android:layout_width="match_parent"
      android:layout_height="match_parent" &gt;
  
      &lt;FrameLayout
          android:layout_width="100dp"
          android:layout_height="100dp"
          android:background="#000000"
          android:layout_centerHorizontal="true"
          android:layout_centerVertical="true"
           /&gt;
  
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>When I run this application on my emulator - I get this screen:
  <img src="https://i.stack.imgur.com/kYF4f.png" alt="enter image description here"></p>
  
  <p>And when I run the application on my device (Galaxy tab 2), I get a screen like this:
  <img src="https://i.stack.imgur.com/2XOf9.png" alt="enter image description here"></p>
  
  <p>As you can see, the square running on device is smaller than running on the emulator.</p>
  
  <p>I am using DP in my XML width and height.  Is the square supposed to be in the same proportion in all resolutions?  If not, what can I do to get this square in the same size in all resolutions?</p>