title: How to fill half of screen with image?
body: <p>I am making a simple app in android studio, which includes two images filling up half of the screen, one on each side. Almost like a split screen. I have used this link: <a href="https://stackoverflow.com/questions/14544327/make-image-appear-half-of-the-screen">Make image appear half of the screen</a> to try and solve my problem; however, it only made the top half of the screen filled with an image and when i tried repeating the code it divided the screen into 3 parts with one more empty space. This is the code which is responsible for that:</p>
  <pre><code>    &lt;LinearLayout
          android:orientation=&quot;vertical&quot;
          android:layout_width=&quot;match_parent&quot;
          android:layout_height=&quot;match_parent&quot;&gt;
  
          &lt;RelativeLayout
              android:layout_width=&quot;match_parent&quot;
              android:layout_height=&quot;0dp&quot;
              android:layout_weight=&quot;0.5&quot;
              &gt;
  
              &lt;ImageView
                  android:id=&quot;@+id/ImageView_swamp&quot;
                  android:layout_width=&quot;match_parent&quot;
                  android:layout_height=&quot;match_parent&quot;
                  android:adjustViewBounds=&quot;true&quot;
                  android:rotation=&quot;-180&quot;
                  android:src=&quot;@drawable/img&quot; /&gt;
  
          &lt;/RelativeLayout&gt;
  
          &lt;View
              android:layout_width=&quot;match_parent&quot;
              android:layout_height=&quot;0dp&quot;
              android:layout_weight=&quot;0.5&quot;
              /&gt;
  
      &lt;/LinearLayout&gt;
  </code></pre>
  <p>Any suggestions?</p>