title: Density independence
body: <p>There is a round circle in the center of my app. With a 480x800 resolution everything is perfekt, but in a 320x480 resolution the circle is too small. I have a circle.png in the drawable-hdpi folder with 470px x 470px. I tried to add a circle.png with 310x310 in the drawable-mdpi folder, but the result was the same.
  This is the code of the layout xml:</p>
  
  <pre><code>&lt;ImageView
      android:id="@+id/indicator"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_centerHorizontal="true"
      android:layout_centerVertical="true"
      android:adjustViewBounds="true"
      android:scaleType="fitCenter"
  
      /&gt;
  </code></pre>
  
  <p>Is it possible that the circle has only a few pixels distance to the left and right edge of the display in every resolution?</p>
  
  <p><a href="http://imageshack.us/photo/my-images/857/apppv.jpg/" rel="nofollow">http://imageshack.us/photo/my-images/857/apppv.jpg/</a></p>
  
  <p>EDIT: I solved this problem in the end this way:</p>
  
  <pre><code>LayoutParams lp = indicator.getLayoutParams();
  lp.width = (int) (disW-(disW*0.06));
  lp.height = (int) (disW-(disW*0.06));
  indicator.setLayoutParams(lp);
  </code></pre>
  
  <p>//This works perfectly well and the aspect ratio is correct.</p>
  
  <p>EDIT2: This is not a solution at all, because the image quality of the scaled image is really bad...but i found two tutorials:
  <a href="http://developer.sonymobile.com/wp/2011/06/27/how-to-scale-images-for-your-android%E2%84%A2-application/" rel="nofollow">http://developer.sonymobile.com/wp/2011/06/27/how-to-scale-images-for-your-android%E2%84%A2-application/</a>
  http://android.creid.eu/how-to-resize-an-image-and-preserve-quality/</p>
  
  <p>I have to work out which is the best way...</p>