I have the same problem with including an EditText into a
RelativeLayout. All layout parameters are ignored, or at least not
recognized properly. The width/height "fix" doesn't work for me,
because the included view must not have fixed width or height.

The included view:

<?xml version="1.0" encoding="UTF-8"?>
<EditText xmlns:android="http://schemas.android.com/apk/res/android";
    android:id="@+id/location_field"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:singleLine="true"
    android:paddingLeft="10sp"
    android:paddingRight="10sp"
    android:layout_centerVertical="false"
    android:layout_centerHorizontal="true"
    android:inputType="text"
    android:imeOptions="actionDone|flagNoEnterAction"
    />

And the layout where I include it:

<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
    xmlns:android="http://schemas.android.com/apk/res/android";
    android:layout_width="fill_parent"
    android:layout_height="fill_parent"
    android:background="@android:color/transparent">

    ...

    <LinearLayout android:id="@+id/search_linear_layout_1"
        android:layout_below="@id/search_title_image"
        android:layout_height="wrap_content"
        android:layout_width="fill_parent">

        ...

    </LinearLayout>

    <include layout="@layout/location_field"
        android:id="@+id/search_edit_text"
        android:layout_width="300px"
        android:layout_below="@id/search_linear_layout_1"
        />

    <LinearLayout android:id="@+id/search_linear_layout_2"
        android:layout_below="@id/search_edit_text"
        android:layout_height="wrap_content"
        android:layout_width="fill_parent">

        ...

    </LinearLayout>

    ...

</RelativeLayout>

The edit box floats at the top of the screen instead of below the
linear layout, and is also not 300 pixels wide.

Any ideas?

Thanks,
Matthias
--~--~---------~--~----~------------~-------~--~----~
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