title: Making two LinearLayouts have 50% of the screen each without using layout_weight
body: <p>I'm currently doing a special xml layout of a landscape screen, where 4 images are present and 2 LinearLayouts are next to each other with 2 images each. These LinearLayouts I call <code>linearLayout1</code> and <code>linearLayout2</code>.</p>
  
  <p><code>linearLayout1</code> is marked with blue rectangle:</p>
  
  <p><img src="https://i.stack.imgur.com/8esxL.png" alt="linearLayout1"></p>
  
  <p><code>linearLayout2</code> is marked with blue rectangle:</p>
  
  <p><img src="https://i.stack.imgur.com/SqeSE.png" alt="linearLayout2"></p>
  
  <p>As you can see, the first one uses ~80% of the screen, while the second one uses what's left. I don't want this of course, I want 50% for each. I can't use <code>layout_weight</code> because it's already used in the LinearLayouts themselves (positioning of the two images) and nested weights are bad for performance.</p>
  
  <p>I've tried many different variations, but I simply can't get the two LinearLayouts to have 50% of the screen each. Here's the code:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  android:id="@+id/db1_root"
  android:layout_width="fill_parent"
  android:layout_height="fill_parent"
  android:orientation="horizontal" &gt;
  
  &lt;LinearLayout
      android:id="@+id/title_container"
      style="@style/TitleBar" &gt;
  
      &lt;ImageView
          style="@style/TitleBarLogo"
          android:contentDescription="@string/imgViewDesc"
          android:src="@drawable/title_logo" /&gt;
  
      &lt;ImageView
          style="@style/TitleBarSeparator"
          android:contentDescription="@string/imgViewDesc" /&gt;
  
      &lt;TextView style="@style/TitleBarText" /&gt;
  
      &lt;ImageButton
          style="@style/TitleBarAction"
          android:contentDescription="@string/imgViewDesc"
          android:onClick="onClickAbout"
          android:src="@drawable/title_about" /&gt;
  &lt;/LinearLayout&gt;
  
  &lt;RelativeLayout
      android:layout_width="fill_parent"
      android:layout_height="wrap_content"
      android:layout_below="@id/title_container"
      android:layout_above="@+id/mobFoxView" &gt;
  
      &lt;!-- LEFT COLUMN --&gt;
  
      &lt;LinearLayout
          android:id="@+id/linearLayout1"
          android:layout_width="fill_parent"
          android:layout_height="fill_parent"
          android:layout_above="@+id/mobFoxView"
          android:layout_alignParentLeft="true"
          android:layout_toLeftOf="@+id/linearLayout2"
          android:background="@color/white"
          android:gravity="center"
          android:orientation="vertical"
          android:weightSum="2" &gt;
  
          &lt;ImageView
              android:id="@+id/imgNews"
              android:layout_width="wrap_content"
              android:layout_height="0dp"
              android:layout_weight="1"
              android:contentDescription="@string/imgViewDesc"
              android:onClick="onClickFeature"
              android:src="@drawable/front_news_1" /&gt;
  
          &lt;ImageView
              android:id="@+id/imgReleases"
              android:layout_width="wrap_content"
              android:layout_height="0dp"
              android:layout_weight="1"
              android:contentDescription="@string/imgViewDesc"
              android:onClick="onClickFeature"
              android:src="@drawable/front_releases_1" /&gt;
      &lt;/LinearLayout&gt;
  
      &lt;!-- RIGHT COLUMN --&gt;
  
      &lt;LinearLayout
          android:id="@+id/linearLayout2"
          android:layout_width="wrap_content"
          android:layout_height="fill_parent"
          android:layout_above="@+id/mobFoxView"
          android:layout_alignParentRight="true"
          android:layout_alignTop="@id/linearLayout1"
          android:background="@color/white"
          android:gravity="center"
          android:orientation="vertical"
          android:weightSum="2" &gt;
  
          &lt;ImageView
              android:id="@+id/imgArtists"
              android:layout_width="wrap_content"
              android:layout_height="0dp"
              android:layout_weight="1"
              android:contentDescription="@string/imgViewDesc"
              android:onClick="onClickFeature"
              android:src="@drawable/front_artists_1" /&gt;
  
          &lt;ImageView
              android:id="@+id/imgLabels"
              android:layout_width="wrap_content"
              android:layout_height="0dp"
              android:layout_weight="1"
              android:contentDescription="@string/imgViewDesc"
              android:onClick="onClickFeature"
              android:src="@drawable/front_labels_1" /&gt;
      &lt;/LinearLayout&gt;
  &lt;/RelativeLayout&gt;
  
  &lt;com.mobfox.sdk.MobFoxView
      android:id="@+id/mobFoxView"
      android:layout_width="fill_parent"
      android:layout_height="50dp"
      android:layout_alignParentBottom="true"
      mode="test"
      publisherId="@string/mobFoxID" /&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>