I tried the following layout and works fine for me....

<LinearLayout
    android:id="@+id/widget45"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="horizontal"
    >
        <EditText
        android:id="@+id/editName"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:padding="10px"
        android:text="Name"
        android:textSize="18sp"
        android:layout_weight="1"
        >
        </EditText>
        <Button
        android:id="@+id/findLocation"
        android:layout_width="fill_parent"
        android:layout_height="wrap_content"
        android:text="Find"
        android:layout_weight="1"
        >
        </Button>
    </LinearLayout>

If this is not working can you tell what else do you have in your
layout?

Regards,
Amit.

On Jan 17, 7:33 pm, "Faber Fedor" <faberfe...@gmail.com> wrote:
> I've got a  LinearLayout (which, along with several other LinearLayouts,  is
> wrapped in a RelativeLayout which is wrapped in a ScrollView).  The XML is
> below.
>
> I want the editName EditText and the Find Button to completely fill the
> layout from left to right regardless of the screen rotation. As currently
> coded, they're both smooshed over to the left.  If I set the EditText's
> android:layout_width="fill_parent", it fills the screen and pushes the
> Button offscreen.
>
> What really irks me is further down my screen I have a TextView and two
> Buttons that operate exactly as I want and I can't see a difference between
> the two layouts.
>
>     <LinearLayout
>     android:id="@+id/widget45"
>     android:layout_width="fill_parent"
>     android:layout_height="fill_parent"
>     android:orientation="horizontal"
>     >
>         <EditText
>         android:id="@+id/editName"
>         android:layout_width="wrap_content"
>         android:layout_height="wrap_content"
>         android:padding="10px"
>         android:text="Name"
>         android:textSize="18sp"
>         android:layout_gravity="left"
>         android.layout_weight="2"
>         >
>         </EditText>
>         <Button
>         android:id="@+id/findLocation"
>         android:layout_width="wrap_content"
>         android:layout_height="wrap_content"
>         android:text="Find"
>         android:layout_gravity="right"
>         android.layout_weight="1"
>         >
>         </Button>
>     </LinearLayout>
>
> --
>
> Faber Fedor
> Cloud Computing New Jerseyhttp://cloudcomputingnj.com
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Beginners" group.
To post to this group, send email to android-beginners@googlegroups.com
To unsubscribe from this group, send email to
android-beginners-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-beginners?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to