title: Android relative layout with button width using weight
body: <p>I've used the <code>layout_weight</code> parameter to set the width of the buttons at 70% of the total layout width, but it seems I'm missing some important detail in order to make it work.</p>
  
  <p>(Another solution would be to work with <code>display.getWidth()</code> programmatically, but it doesn't work either, because I don't know what my .xml should look like If I choose to set the width with <code>button.setWidth()</code>)</p>
  
  <pre class="lang-xml prettyprint-override"><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
  &lt;RelativeLayout 
      xmlns:android="http://schemas.android.com/apk/res/android"
      android:layout_height="fill_parent" 
      android:layout_width="fill_parent"
      android:layout_weight="1.0"&gt;
      &lt;TextView
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:textSize="15px"  
          android:id="@+id/userVersionTextViewNew"
          android:gravity="center"
          android:layout_centerVertical="true"/&gt;
      &lt;TextView
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:textSize="15px"
          android:gravity="center"
          android:layout_above="@id/userVersionTextViewNew"
          android:id="@+id/userSoftSerialNumberTextView"/&gt;
      &lt;ImageView
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:src="@drawable/logo_200"
          android:layout_above="@id/userSoftSerialNumberTextView"
          android:layout_centerHorizontal="true"/&gt;    
      &lt;TextView
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:textSize="15px"
          android:gravity="center"
          android:layout_below="@id/userVersionTextViewNew"
          android:id="@+id/dummyTextView"/&gt;       
      &lt;Button
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:id="@+id/loginButton"
          android:text="Σύνδεση"
          android:layout_centerHorizontal="true"
          android:layout_below="@id/dummyTextView"
          android:layout_weight="0.7"/&gt;
      &lt;Button
          android:layout_width="fill_parent"
          android:layout_height="wrap_content"
          android:id="@+id/demoLoginButton"
          android:text="Δοκιμαστική χρήση"
          android:layout_centerHorizontal="true"
          android:layout_below="@id/loginButton"
          android:layout_weight="0.7"/&gt;
  &lt;/RelativeLayout&gt;
  </code></pre>