title: defining ImageView width relative to parent view's width?
body: <p>I have a layout below like this </p>
  
  <pre><code>    &lt;RelativeLayout 
      android:id="@+id/layout_info"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
       &gt;
  
      &lt;TextView
          android:id="@+id/textStatus"
          android:layout_width="wrap_content"
          android:layout_height="wrap_content"  
          android:layout_alignParentTop="true"
          android:layout_centerHorizontal="true"
          android:text="some text"
          android:textAppearance="?android:attr/textAppearanceMedium" /&gt;
  
      &lt;ImageView
          android:id="@+id/imageView_main"
          android:layout_width="???"
          android:layout_height="???"           
          android:layout_centerInParent="true"        
          android:src="@drawable/ic_computer" /&gt;
  
      &lt;Button
          android:id="@+id/button_id"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_alignParentBottom="true"
          android:text="some text" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>The title text should stick to the top of layout, image in the centre and button at the bottom.</p>
  
  <p>I want to set the width and height of the ImageView to be 50% of the width of its parent.
  Any ideas how this can be achieved here ?</p>