title: Align Buttons horizontally with equal spacing in linearlayout
body: <p>i am trying to make a Linear Layout with 5 buttons horizontally placed with equal spacing, but all the buttons size (width) should be 40dp only.</p>
  
  <p>i tried this :</p>
  
  <pre><code>&lt;LinearLayout   android:id="@+id/button_layout"
                      android:background="#DCE1DC"
                      android:orientation="horizontal"
                      android:weightSum="5"
                      android:layout_width="fill_parent"
                      android:layout_height="70dip"&gt;
  
          &lt;Button     android:id="@+id/button_A"
                      android:layout_weight="1"
                      android:layout_height="60dp"
                      android:layout_width="0dp"
                      android:layout_gravity="center_vertical"
                      android:layout_marginLeft="30dp"/&gt;
  
          &lt;Button     android:id="@+id/button_B"
                      android:layout_weight="1"
                      android:layout_height="60dp"
                      android:layout_width="0dp"
                      android:layout_gravity="center_vertical"
                      android:layout_marginLeft="30dp"/&gt;
  
          &lt;Button     android:id="@+id/button_C"
                      android:layout_weight="1"
                      android:layout_height="60dp"
                      android:layout_width="0dp"
                      android:layout_gravity="center_vertical"
                      android:layout_marginLeft="30dp"/&gt;
  
          &lt;Button     android:id="@+id/button_D"
                      android:layout_weight="1"
                      android:layout_height="60dp"
                      android:layout_width="0dp"
                      android:layout_gravity="center_vertical"
                      android:layout_marginLeft="30dp"/&gt;
  
          &lt;Button     android:id="@+id/button_E"
                      android:layout_weight="1"
                      android:layout_height="60dp"
                      android:layout_width="0dp"
                      android:layout_gravity="center_vertical"
                      android:layout_marginRight="30dp"
                      android:layout_marginLeft="30dp"/&gt;
  
      &lt;/LinearLayout&gt;
  </code></pre>
  
  <p>its working but i need the buttons width to be smaller , how to acheive this?</p>