Yes, thank you - works wonderful ;) Just some more words for
clarification:

 - Set layout_height of the Views which should determine the
LinearLayout height to "wrap_content" (the tallest will determine it)
 - Set layout_height of the Views to be adjusted to "fill_parent"



On Feb 11, 5:26 pm, Romain Guy <[email protected]> wrote:
> It's pretty easy. Either keep your LinearLayout and give one view a
> height of wrap_content and the other one a height of fill_parent. You
> can also switch to RelativeLayout and align the second view to the top
> *and* bottom of the first view.
>
>
>
> On Wed, Feb 11, 2009 at 4:04 AM, Chronos <[email protected]> wrote:
>
> > Hello :)
>
> > I am building a form where the city field has a locate-button besides
> > it. Unfortunately, they do not have the same height by default (and I
> > do not know the height in advance). I would like to have the
> > ImageButton have the same height as the AutoCompleteTextView:
>
> > <LinearLayout
> >        android:layout_width="fill_parent"
> >        android:layout_height="wrap_content"
> >        android:orientation="horizontal">
> >        <AutoCompleteTextView
> >                android:id="@+id/cityField"
> >                android:layout_width="wrap_content"
> >                android:layout_height="wrap_content"
> >                android:layout_weight="1"
> >                android:singleLine="true"
> >                android:selectAllOnFocus="true"/>
> >        <ImageButton
> >                android:id="@+id/locateButton"
> >                android:layout_width="wrap_content"
> >                android:layout_height="wrap_content"
> >                android:src="@android:drawable/ic_menu_mylocation"/>
> > </LinearLayout>
>
> > I already tried a RelativeLayout - and it is possible to align the
> > height of both views, but unfortunately I cannot assign a
> > layout_weight attribute to make the TextView consume all space. I'm
> > stuck now - can anybody help ?
>
> > Thx
>
> --
> Romain Guy
> Android framework engineer
> [email protected]
>
> Note: please don't send private questions to me, as I don't have time
> to provide private support.  All such questions should be posted on
> public forums, where I and others can see and answer them
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to