title: Button size relative to parent size in XML layout?
body: <p>Is it possible to set <strong>in the XML layout file</strong> the size of the button so that, on one hand, it doesn't take the entire width of the parent (screen) and, on the other hand, doesn't use absolute pixel values?</p>
  
  <p>To better explain my question, the problem in the following snippet is that <code>"match_parent"</code> takes the entire width:</p>
  
  <pre><code>&lt;Button android:id="@+id/btn_1"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"
      android:paddingBottom="16px"
      android:paddingLeft="16px"
      android:paddingRight="16px"
      android:paddingTop="16px"
      android:text="@string/first_button" /&gt;
  </code></pre>
  
  <p>I know that it's possible to control the size <a href="https://stackoverflow.com/questions/5162077/custom-layout-whos-size-is-screen-size/5162394#5162394">during runtime</a> but I am interested to know whether this is possible in an XML file as well.</p>
  
  <p>Is there something like <code>android:layout_width="match_HALF_parent"</code>?</p>