title: how to set max Width for a Layout
body: <p>After a lot of googling I'm unable to find a solution to this problem. I have this layout:</p>
  
  <pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
            android:id="@+id/adlayout"
            android:layout_width="fill_parent"
            android:layout_height="fill_parent"
            android:orientation="vertical"&gt;
  &lt;TableLayout
     xmlns:android="http://schemas.android.com/apk/res/android"
     android:orientation="vertical"
     android:layout_width="fill_parent"
     android:layout_height="wrap_content"
     android:stretchColumns="1"
     android:layout_weight="1"
    &gt;
  
    &lt;TableRow android:id="@+id/tableRow1" android:layout_width="fill_parent"   android:layout_height="wrap_content"&gt;
         &lt;TextView android:padding="6dip" android:text="@string/barcode_format"  android:id="@+id/textView1" android:layout_width="wrap_content"   android:layout_height="wrap_content"&gt;&lt;/TextView&gt;
         &lt;EditText android:padding="6dip" android:layout_width="fill_parent" android:id="@+id/edit_barcode_format" android:layout_height="wrap_content"&gt;&lt;/EditText&gt;
    &lt;/TableRow&gt;
    &lt;TableRow android:id="@+id/tableRow1" android:layout_width="fill_parent" android:layout_height="wrap_content"&gt;
        &lt;TextView android:padding="6dip" android:text="@string/barcode_type" android:id="@+id/textView2" android:layout_width="wrap_content" android:layout_height="wrap_content"&gt;&lt;/TextView&gt;
        &lt;EditText android:padding="6dip" android:layout_width="fill_parent" android:id="@+id/edit_barcode_type" android:layout_height="wrap_content"&gt;&lt;/EditText&gt;
    &lt;/TableRow&gt;        
   &lt;/TableLayout&gt;
  
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>The table layout defines a form. On a phone looks ok but on a tablet, the edittext views looks too large. I want to set a max Width for the layout, and paint the form centered.</p>