2

我的主要文件中有这个 XMl...

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
    android:layout_width="fill_parent"
    android:layout_height="wrap_content"
    android:orientation="vertical"
    android:paddingTop="4px" >

    <include
        android:id="@+id/search"
        layout="@layout/search" />



    <ListView
        android:id="@+id/wordList"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_below="@+id/search"
        android:layout_centerHorizontal="true" >

    </ListView>

</RelativeLayout>

我的问题是我的 ListView 没有出现在 android:id="@+id/search" 下面...所以我做错了什么?

4

2 回答 2

2

采用

android:layout_below="@id/search"

+那里不需要。

于 2012-06-02T20:37:16.607 回答
0

另一个假设:包含的布局可能有 height="match_parent" 以便 ListView 没有任何剩余空间......

于 2012-06-02T21:00:04.983 回答