title: Android align top bitmap in imageview
body: <p>Is there anyway so I can align bitmap in <code>ImageView</code>. I have an issue with my image view. I'm setting it's source via Java Code and after bitmap is resized it's centered in <code>ImageView</code>, but the thing that I want is to align the bitmap.</p>
  
  <p>Declaring the imageView :</p>
  
  <pre><code>    &lt;RelativeLayout
      android:id="@+id/collection_background"
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"
      android:layout_below="@+id/actionbar" &gt; 
  
  
       &lt;ImageView  
          android:id="@+id/collection_image_background"
          android:layout_width="fill_parent"
          android:layout_height="match_parent"
          android:background="#ffffff"
          android:layout_alignParentTop="true"
          android:layout_centerHorizontal="true"
          android:contentDescription="@string/stampii"  /&gt;
  
      // countinue ........
  </code></pre>
  
  <p>and here is how I'm setting the bitmap :</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>
  
  <p>Any ides how to do that?</p>