title: How can I distribute views in a linear layout (which is a child of another linear layout) evenly?
body: <p>I am trying to design a layout which basically consists of the following</p>
  
  <ul>
  <li><p>Linear Layout (Horizontal)</p>
  
  <ul>
  <li><p>Linear Layout (Vertical)</p>
  
  <ul>
  <li>textview</li>
  <li>textview</li>
  <li>imageview</li>
  </ul>
  
  <p>(end of vertical)</p></li>
  <li><p>Linear Layout (Vertical)</p>
  
  <ul>
  <li>textview</li>
  <li>textview</li>
  <li>imageview</li>
  </ul></li>
  </ul>
  
  <p>(end of vertical)</p></li>
  </ul>
  
  <p>(end of horizontal)</p>
  
  <p>Now I have 2 more Linear Layouts (Horizontal orientation) of the similar kind as stated above. A total of 3 in the layout file.</p>
  
  <p>I was able to construct the above requirement. But when I run the application, the views aren't getting distributed evenly. There is a lot of white space at the bottom and the sides of the device screen.</p>
  
  <p>How to do that?</p>
  
  <p>Any corrections/suggestions can be of great help. Thanks.</p>
  
  <p>Below is my xml file</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="false" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>&lt;LinearLayout
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_margin="20dp"
          android:baselineAligned="false"
          android:orientation="horizontal" &gt;
  
          &lt;LinearLayout
              android:id="@+id/ll1"
              android:layout_width="0dp"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:orientation="vertical" &gt;
  
              &lt;TextView
                  android:id="@+id/textView13"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:gravity="center_horizontal|center_vertical"
                  android:text="@string/Connected"
                  android:textSize="12sp" /&gt;
  
              &lt;TextView
                  android:id="@+id/textView14"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:gravity="center_horizontal|center_vertical"
                  android:text="@string/time"
                  android:textSize="12sp" /&gt;
  
              &lt;ImageView
                  android:id="@+id/lte3G"
                  android:layout_width="64dp"
                  android:layout_height="64dp"
                  android:gravity="center_horizontal|center_vertical"
                  android:src="@drawable/lte" /&gt;
          &lt;/LinearLayout&gt;
  
          &lt;LinearLayout
              android:id="@+id/ll2"
              android:layout_width="0dp"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:orientation="vertical" &gt;
  
              &lt;TextView
                  android:id="@+id/textView22"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:gravity="center_horizontal|center_vertical"
                  android:text="@string/Operator"
                  android:textSize="12sp" /&gt;
  
              &lt;TextView
                  android:id="@+id/textView23"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:gravity="center_horizontal|center_vertical"
                  android:text="@string/Docomo"
                  android:textSize="12sp" /&gt;
  
              &lt;ImageView
                  android:id="@+id/operator"
                  android:layout_width="64dp"
                  android:layout_height="64dp"
                  android:gravity="center_horizontal|center_vertical"
                  android:src="@drawable/network" /&gt;
          &lt;/LinearLayout&gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_margin="20dp"
          android:baselineAligned="false"
          android:orientation="horizontal" &gt;
  
          &lt;LinearLayout
              android:id="@+id/ll3"
              android:layout_width="0dp"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:orientation="vertical" &gt;
  
              &lt;TextView
                  android:id="@+id/textView16"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:gravity="center_horizontal|center_vertical"
                  android:text="@string/Short"
                  android:textSize="12sp" /&gt;
  
              &lt;TextView
                  android:id="@+id/textView17"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:gravity="center_horizontal|center_vertical"
                  android:text="@string/Messages"
                  android:textSize="12sp" /&gt;
  
              &lt;ImageView
                  android:id="@+id/SMS"
                  android:layout_width="64dp"
                  android:layout_height="64dp"
                  android:gravity="center_horizontal|center_vertical"
                  android:src="@drawable/sms" /&gt;
          &lt;/LinearLayout&gt;
  
          &lt;LinearLayout
              android:id="@+id/ll4"
              android:layout_width="0dp"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:orientation="vertical" &gt;
  
              &lt;TextView
                  android:id="@+id/textView25"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:gravity="center_horizontal|center_vertical"
                  android:text="@string/Connected1"
                  android:textSize="12sp" /&gt;
  
              &lt;TextView
                  android:id="@+id/textView26"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:gravity="center_horizontal|center_vertical"
                  android:text="@string/Clients"
                  android:textSize="12sp" /&gt;
  
              &lt;ImageView
                  android:id="@+id/clients"
                  android:layout_width="64dp"
                  android:layout_height="64dp"
                  android:gravity="center_horizontal|center_vertical"
                  android:src="@drawable/clients" /&gt;
          &lt;/LinearLayout&gt;
      &lt;/LinearLayout&gt;
  
      &lt;LinearLayout
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:layout_margin="20dp"
          android:baselineAligned="false"
          android:orientation="horizontal" &gt;
  
          &lt;LinearLayout
              android:id="@+id/ll5"
              android:layout_width="0dp"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:orientation="vertical" &gt;
  
              &lt;TextView
                  android:id="@+id/textView19"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:gravity="center_horizontal|center_vertical"
                  android:text="@string/Traffic"
                  android:textSize="12sp" /&gt;
  
              &lt;TextView
                  android:id="@+id/textView20"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:gravity="center_horizontal|center_vertical"
                  android:text="@string/Usage"
                  android:textSize="12sp" /&gt;
  
              &lt;ImageView
                  android:id="@+id/traffic"
                  android:layout_width="64dp"
                  android:layout_height="64dp"
                  android:gravity="center_horizontal|center_vertical"
                  android:src="@drawable/traffic" /&gt;
          &lt;/LinearLayout&gt;
  
          &lt;LinearLayout
              android:id="@+id/ll6"
              android:layout_width="0dp"
              android:layout_height="wrap_content"
              android:layout_weight="1"
              android:orientation="vertical" &gt;
  
              &lt;TextView
                  android:id="@+id/textView28"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:gravity="center_horizontal|center_vertical"
                  android:text="@string/Battery"
                  android:textSize="12sp" /&gt;
  
              &lt;TextView
                  android:id="@+id/textView29"
                  android:layout_width="wrap_content"
                  android:layout_height="wrap_content"
                  android:gravity="center_horizontal|center_vertical"
                  android:text="@string/Status"
                  android:textSize="12sp" /&gt;
  
              &lt;ImageView
                  android:id="@+id/imageView7"
                  android:layout_width="64dp"
                  android:layout_height="64dp"
                  android:gravity="center_horizontal|center_vertical"
                  android:src="@drawable/battery" /&gt;
          &lt;/LinearLayout&gt;
      &lt;/LinearLayout&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>Below is the screenshot.</p>
  
  <p><img src="https://i.stack.imgur.com/YTtkf.png" alt="enter image description here"></p>