Custom dialog with 2 buttons
<p>I want to create a custom dialog.i have created an res/values/action.xml</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;resources&gt;

     &lt;style name="Theme.RCAlertDialog" parent="android:style/Theme.Dialog"&gt;

        &lt;item name="android:windowBackground"&gt;@drawable/quick_action2&lt;/item&gt;

    &lt;/style&gt;
&lt;/resources&gt;
</code></pre>

<p>the drawable i m using is this:</p>

<p><img src="http://i.stack.imgur.com/CIpPZ.png" alt="enter image description here"></p>

<p>i want to have two buttons inside my graphic that the sum of their two width will be as the width of the red box.How can i do it?
this is the code i m using now but the result is changing from portrait to landscape mode.</p>

<pre><code>&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="horizontal" &gt;

    &lt;ImageButton
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_marginLeft="30px"
        android:layout_marginTop="21px"
        android:layout_weight="1"
        android:background="@drawable/fav2" /&gt;

    &lt;ImageButton
        android:layout_width="wrap_content"
        android:layout_height="fill_parent"
        android:layout_marginRight="30px"
        android:layout_marginTop="21px"
        android:layout_weight="1"
        android:background="@drawable/eat2" /&gt;

&lt;/LinearLayout&gt;
</code></pre>

<p>Is there any good way to do it right?thanks</p>
