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
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers-unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to