title: How to create layout with 6 buttons like windows tiles
body: <p>I'm trying to create a layout with 6 buttons that automatically adapt to the screen size as the tiles of windows phone. In the code I create dynamically the 6 button, 2 for line but the button should fit the size of the screen filling the latter. how can I proceed?</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="match_parent"
  android:layout_height="match_parent"
  android:orientation="vertical" &gt;
  
  &lt;LinearLayout
      android:layout_width="match_parent"
          android:layout_height="0dip"
      android:orientation="horizontal"
      android:weightSum="2" &gt;
  
      &lt;Button
          android:layout_width="0dip"
                  android:layout_height="match_parent"
          android:layout_weight="1"
          android:background="@drawable/conv_up" /&gt;
  
      &lt;Button
          android:layout_width="0dip"
                  android:layout_height="match_parent"
          android:layout_weight="1"
          android:background="@drawable/conv_up"
           /&gt;
  
  &lt;/LinearLayout&gt;
  
  &lt;LinearLayout
      android:layout_width="match_parent"
          android:layout_height="0dip"
      android:orientation="horizontal"
      android:weightSum="2" &gt;
  
      &lt;Button
          android:layout_width="0dip"
                  android:layout_height="match_parent"
          android:layout_weight="1"
          android:background="@drawable/conv_up"
          /&gt;
  
      &lt;Button
          android:layout_width="0dip"
                  android:layout_height="match_parent"
          android:layout_weight="1"
          android:background="@drawable/conv_up"
           /&gt;
  
  &lt;/LinearLayout&gt;
  
  &lt;LinearLayout
      android:layout_width="match_parent"
          android:layout_height="0dip"
      android:orientation="horizontal"
      android:weightSum="2" &gt;
  
      &lt;Button
          android:layout_width="0dip"
                  android:layout_height="match_parent"
          android:layout_weight="1"
          android:background="@drawable/conv_up"
           /&gt;
  
      &lt;Button
          android:layout_width="0dip"
                  android:layout_height="match_parent"
          android:layout_weight="1"
          android:background="@drawable/conv_up"
          /&gt;
  
  &lt;/LinearLayout&gt;
  </code></pre>
  
  <p></p>