title: Android setting Button width half the screen
body: <p>How to setup(in XML) that the button will have width half of screen. I found only wrap content, match parent(fills whole screen) and exact amount of dp eg: 50dp.
  How to set it exactly hold the screen?</p>
  
  <pre><code>&lt;RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
   android:weightSum="2"
  &gt;
  
   &lt;Button
       android:id="@+id/buttonCollect"
       android:layout_width="match_parent"
       android:layout_height="wrap_content"
       android:layout_weight="1"
       android:paddingLeft="8dp"
       android:paddingRight="8dp"
       android:text="przycisk" /&gt;
  
  &lt;Button
      android:id="@+id/button2"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:layout_alignParentBottom="true"
      android:layout_alignParentRight="true"
      android:text="Button" /&gt;
  </code></pre>
  
  <p></p>