How set width of one element equal to other in android?
<p>I have two buttons defined in XML</p>

<pre><code> &lt;Button
            android:layout_alignParentBottom="true"
            android:id="@+id/takepic_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/Take_Pic"
            android:layout_gravity="left"
            android:layout_alignParentLeft="true"           
     /&gt;


     &lt;Button
            android:layout_alignParentBottom="true"
            android:layout_alignParentRight="true"
            android:id="@+id/cancel_button"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="@string/Cancel"
            android:layout_gravity="right"    
     /&gt;
</code></pre>

<p>My question is how can I tell android that set the width of second button equal to whatever is the width of first button.</p>

<p>Update: I am looking for XML solution</p>
