title: Android Studio different picture size on different devices
body: <p>i'm writing android code for about 2 months.
  Now there is the first point i'm stucked with.</p>
  
  <p>I thought using dp for sizes results objects different on different resolutions.</p>
  
  <p>In the concrete project i have an imageview with the dimensions:</p>
  
  <pre><code>width: wrap_content
  height: 250dp
  </code></pre>
  
  <p>On my Galaxy S4 the complete layout looks fine, but on my Galaxy S2 the <code>ImageView</code> has the same size and the layout don't fit the screen.</p>
  
  <ul>
  <li>Did i misunderstood the use of dp?</li>
  <li>How is it possible to scale an object right depending on the
  resolution of the screen?</li>
  </ul>
  
  <p>Thanks in Advance</p>
  
  <p>Marcus</p>
  
  <p>Edit: I have only 1 version of my image in the drawable folder.</p>
  
  <p>My layout is written like below:</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  xmlns:app="http://schemas.android.com/apk/res-auto" android:layout_width="match_parent"
  android:layout_height="match_parent" android:paddingLeft="@dimen/activity_horizontal_margin"
  android:paddingRight="@dimen/activity_horizontal_margin"
  android:paddingTop="@dimen/activity_vertical_margin"
  android:paddingBottom="@dimen/activity_vertical_margin"
  app:layout_behavior="@string/appbar_scrolling_view_behavior"
  tools:showIn="@layout/activity_main" tools:context=".MainActivity"
  android:background="@drawable/curtain2"&gt;
  
      &lt;ImageView
      android:layout_width="wrap_content"
      android:layout_height="250dp"
      android:id="@+id/ValuesImageView"
      android:scaleType="fitXY"
      android:src="@drawable/overview_values2"
      android:layout_below="@+id/ValuesTextView"
      android:layout_alignParentLeft="true"
      android:layout_alignParentStart="true" /&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:textAppearance="?android:attr/textAppearanceLarge"
      android:text="@string/Text_Values"
      android:id="@+id/ValuesTextView"
      android:layout_alignParentTop="true"
      android:layout_centerHorizontal="true"
      android:textColor="@color/colorText"/&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:textAppearance="?android:attr/textAppearanceSmall"
      android:text="@string/Text_Indipendence"
      android:id="@+id/IndipendenceTextView"
      android:layout_below="@+id/ValuesImageView"
      android:layout_centerHorizontal="true"
      android:textColor="@color/colorText"/&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:textSize="25sp"
      android:text="@string/Text_Choose"
      android:id="@+id/ChooseTextView"
      android:layout_below="@+id/IndipendenceTextView"
      android:layout_centerHorizontal="true"
      android:layout_marginTop="28dp"
      android:gravity="center"
      android:textColor="@color/colorText"/&gt;
  
  &lt;TextView
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:textAppearance="?android:attr/textAppearanceLarge"
      android:text="@string/Text_Start"
      android:id="@+id/StartTextView"
      android:gravity="center"
      android:textColor="@color/colorText"
      android:layout_below="@+id/ChooseTextView"
      android:layout_centerHorizontal="true" /&gt;
  
  &lt;Button
      android:layout_width="200dp"
      android:layout_height="wrap_content"
      android:text="@string/Text_Button_Start"
      android:id="@+id/StartButton"
      android:layout_marginTop="43dp"
      style="@style/btnStyleBlackpearl"
      android:layout_below="@+id/StartTextView"
      android:layout_centerHorizontal="true" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>The drawable file for the background is resized correctly.</p>
  
  <p>Do i have to add an image for every resolution (mdpi, hdpi...)?</p>
  
  <p>Is there a tool to convert an image to the different resolutions?</p>
  
  <p>I want the Values <code>ImageView</code> resize at smaller displays too, but the height seems to be fixed at 250dp if i compare the display of both phones.</p>
  
  <p>Sorry for the lated answer, id didn't expect answers that quick.</p>
  
  <p>+1 for this :)</p>