title: Divide height in 3 with LinearLayouts
body: <p>I want to place 3 separate <code>LinearLayout</code> controls inside a <code>RelativeLayout</code>, and divide the available height between the 3 <code>LinearLayout</code> controls, so that they all have an even height.</p>
  
  <p>I have tried, <code>weightSum</code>, as well as <code>gravity</code>, but none of these work as I wrongly assumed it would. I have read about <code>layout_weight</code>, but this is not available in <code>LinearLayout</code>.</p>
  
  <p>I can give each of them a static height, but how would I know the available space for each and every device the app may run on?</p>
  
  <p>Here is my current code:</p>
  
  <pre><code>&lt;RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="@drawable/bg_image"&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:gravity="top"
          android:weightSum="1"&gt;
  
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:gravity="center"
          android:weightSum="1"&gt;&lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:layout_width="match_parent"
          android:layout_height="match_parent"
          android:gravity="bottom"
          android:weightSum="1"&gt;&lt;/LinearLayout&gt;
  
  &lt;/RelativeLayout&gt;
  </code></pre>
  
  <p>I am still learning Android development, so any help/advice would be appreciated.</p>