title: Using a RelativeLayout to split a layout evenly
body: <p>I have a Listview where each listview item looks like this!<img src="https://i.stack.imgur.com/V3ANn.png" alt="enter image description here"></p>
  
  <p>The ListViewItem is a RelativeLayout. Now I am having problem in creating the two split-screen buttons. Currently I'm doing it like this.</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:orientation="vertical" 
      android:layout_width="fill_parent"
      android:layout_height="fill_parent"&gt;
  
      &lt;LinearLayout 
          android:layout_height="fill_parent" android:layout_width="fill_parent"
          android:layout_below="@+id/ReviewText"&gt;
  
      &lt;RelativeLayout
          android:layout_weight="1"
          android:layout_height="fill_parent" android:layout_width="0dp"
          android:onClick="likeClicked"
          android:clickable="true" &gt;
          &lt;!-- SOME CODE --&gt;
      &lt;/RelativeLayout&gt;
  
      &lt;RelativeLayout
          android:layout_weight="1"
          android:layout_height="fill_parent" android:layout_width="0dp"
          android:onClick="likeClicked"
          android:clickable="true" &gt;
          &lt;!-- SOME CODE --&gt;
      &lt;/RelativeLayout&gt;
  
      &lt;/LinearLayout&gt;
  
  &lt;RelativeLayout&gt;
  </code></pre>
  
  <p>This is working perfectly fine, but the <a href="https://developer.android.com/training/improving-layouts/optimizing-layout.html" rel="nofollow noreferrer">android dev documentation here</a> says that </p>
  
  <blockquote>
    <p>Furthermore, nesting several instances of LinearLayout that use the
    layout_weight parameter can be especially expensive as each child
    needs to be measured twice. This is particularly important when the
    layout is inflated repeatedly, such as when used in a ListView or
    GridView.</p>
  </blockquote>
  
  <p>Can I improve my code for performance. If yes, How? Is there any other way to have two buttons split evenly without using LinearLayout?</p>