How to align a two buttons layout left and right in android
<p>i want to align two buttons with linear layout right side one button and left side one button like next and previous button on image gallery.but, i am try to align but not work and below xml layout code:</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:orientation="vertical"
    android:background="@android:color/white"
    android:gravity="bottom" &gt;


    &lt;LinearLayout
        android:id="@+id/linearLayout1"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:background="@android:color/black" &gt;

        &lt;Button
            android:id="@+id/button1"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="prev"
            android:layout_alignParentRight="true" /&gt;

        &lt;Button
            android:id="@+id/button2"
            android:layout_width="wrap_content"
            android:layout_height="wrap_content"
            android:text="next" /&gt;

    &lt;/LinearLayout&gt;

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

<p>here's the my output:</p>

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

<p>I am excepted output like below screen shot:</p>

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

<p>Thanks in Advance!</p>
