title: Android align image in top and center in RelativeLayout
body: <p>I'm trying to align image to top of my Relative Layout and after that center it horizontally. Here is the code I'm using for :</p>
  
  <pre><code>&lt;ImageView  
          android:id="@+id/collection_image_background"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:layout_alignParentTop="true"
          android:layout_centerHorizontal="true"  /&gt;
  </code></pre>
  
  <p>,but this code is not working. My image is centered,but not aligned at top of my Relative Layout. I tried with <code>android:scaleType="fitStart"</code>, but it's actually align imag left and top of it's parent.</p>
  
  <p>So any idea how I can align the image correctly as I need?</p>
  
  <p>P.S. I forget to mention that I'm setting the image to my <code>ImageView</code> like this :</p>
  
  <pre><code>    BitmapFactory.Options o2 = new BitmapFactory.Options();
      o2.inTempStorage = new byte[8*1024];
  
      ops = BitmapFactory.decodeStream(cis,null,o2);
      ImageView view = (ImageView) findViewById(R.id.collection_image_background);
      view.setImageBitmap(ops);
  </code></pre>