title: Defining a percentage width for a LinearLayout?
body: <p>I want to define a percentage width (70%) for a LinearLayout that contains some buttons, so that I can center it and so that the child buttons can fill_parent. Here's a picture showing what I mean:</p>
  
  <p><img src="https://i.stack.imgur.com/Ruvl6.png" alt="example"></p>
  
  <p>My current layout looks like this:</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_width="fill_parent" android:layout_height="fill_parent"
      android:id="@+id/layoutContainer" android:orientation="vertical"&gt;
      &lt;LinearLayout android:layout_width="fill_parent"
          android:id="@+id/barContainer" android:orientation="horizontal"
          android:layout_height="40dp" android:background="@drawable/titlebackground"&gt;
          &lt;ImageView android:id="@+id/barLogo" android:src="@drawable/titlelogo"
              android:layout_gravity="center_vertical" android:adjustViewBounds="true"
              android:layout_height="25dp" android:layout_width="wrap_content"
              android:scaleType="fitXY" android:paddingLeft="5dp"&gt;&lt;/ImageView&gt;
      &lt;/LinearLayout&gt;
      &lt;TextView android:layout_height="wrap_content"
          android:layout_width="fill_parent" android:gravity="center_horizontal"
          android:id="@+id/searchTip" android:text="@string/searchTip"
          android:paddingTop="10dp" android:paddingBottom="10dp"&gt;&lt;/TextView&gt;
      &lt;LinearLayout android:layout_height="wrap_content"
          android:id="@+id/linearLayout1" android:orientation="vertical" android:layout_width="wrap_content"&gt;
          &lt;Button android:text="Button" android:id="@+id/button1"
              android:layout_width="wrap_content" android:layout_height="wrap_content"&gt;&lt;/Button&gt;
          &lt;Button android:layout_width="wrap_content" android:id="@+id/button2" android:layout_height="wrap_content" android:text="Button"&gt;&lt;/Button&gt;
          &lt;Button android:layout_width="wrap_content" android:id="@+id/button3" android:layout_height="wrap_content" android:text="Button"&gt;&lt;/Button&gt;
      &lt;/LinearLayout&gt;
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>The LinearLayout im referring to has the id: linearLayout1. How do I do this?</p>