Android XML layout home screen widget
<p>I am working with home screen widget.I want the button on the far right (second button) to stay fixed against the right of the parent linearlayout. </p>

<p>here is the 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:id="@+id/LinearLayout01"
android:layout_width="200dp"
android:layout_height="75dp"
android:background="@drawable/shape"
android:orientation="horizontal" &gt;

&lt;Button
    android:id="@+id/update"
    android:layout_width="30dp"
    android:layout_height="fill_parent"
    android:layout_alignParentBottom="true"
    android:layout_alignParentLeft="true"
    android:text="Update"
    android:textSize="3pt" /&gt;

&lt;LinearLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/LinearLayout01"
    android:layout_width="wrap_content"
    android:layout_height="fill_parent"
    android:background="@drawable/shape"
    android:orientation="vertical" &gt;

    &lt;TextView
        android:id="@+id/ssid"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="center_horizontal"
        android:text="SSID"
        android:textColor="#333333"
        android:textSize="5pt"
        android:layout_weight="1" /&gt;

    &lt;TextView
        android:id="@+id/wifiip"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:gravity="center_horizontal"
        android:text="IP address"
        android:textColor="#333333"
        android:textSize="5pt"
        android:layout_weight="1" /&gt;

    &lt;TextView
        android:id="@+id/extip"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_below="@+id/ssid"
        android:text="WAN IP"
        android:textColor="#333333"
        android:textSize="5pt"
        android:layout_weight="1" /&gt;
&lt;/LinearLayout&gt;

&lt;Button
    android:id="@+id/config"
    android:layout_width="30dp"
    android:layout_height="fill_parent"
    android:layout_alignParentRight="true"
    android:text="Config"
    android:textSize="3pt" /&gt;
</code></pre>

<p></p>

<p>the vertical linear layout in the middle is pushing or pulling the button right or left depding on the width of the textviews. Where am i going wrong?</p>

<p>Here is the xml for the widget provider</p>

<pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;appwidget-provider
xmlns:android="http://schemas.android.com/apk/res/android" 
android:minWidth="200dp"
android:minHeight="75dp"
android:initialLayout="@layout/widget"
android:updatePeriodMillis="180000"

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