title: Set full layout of Image in Android
body: <p>I am trying to set two images in two different layouts.</p>
  
  <p>The resolution size of the image: 986 * 569. </p>
  
  <p>Layout with .50 weight</p>
  
  <p>Something like below:</p>
  
  <pre><code>  &lt;?xml version="1.0" encoding="utf-8"?&gt;
    &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
     android:layout_width="match_parent"
     android:layout_height="match_parent"
     android:background="@drawable/bluebg"
     android:orientation="vertical" &gt;
  
  &lt;LinearLayout
      android:id="@+id/AmLayout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_weight=".50"&gt;
  
      &lt;ImageView
          android:id="@+id/imageAm"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:src="@drawable/am"
          android:visibility="visible" /&gt;
  &lt;/LinearLayout&gt;
  
  &lt;LinearLayout
      android:id="@+id/horibreak1"
      android:layout_width="match_parent"
      android:layout_height="2dp"
      android:background="#000000"
      android:orientation="vertical" &gt;
  &lt;/LinearLayout&gt;
  
  &lt;LinearLayout
      android:id="@+id/PmLayout"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:layout_weight=".50"&gt;
  
      &lt;ImageView
          android:id="@+id/imagePm"
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:src="@drawable/pm"
          android:visibility="visible" /&gt;
  &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>The problem is the image is not stretched to full layout. How to fix this? </p>
  
  <p>I get something like: <a href="http://i.imgur.com/GT6es7o.png?1" rel="nofollow">http://i.imgur.com/GT6es7o.png?1</a></p>