私はそれぞれのレイアウトにヘッダーを追加しています。これまでのところリストビューになるまでうまくいきました。リストビューは表示されません。Includeを使用した後でListViewが表示されない
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent" android:layout_height="fill_parent"
android:background="#FFFFFF">
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent">
<include android:id="@+id/headerbar" layout="@layout/header"
android:layout_height="wrap_content" android:layout_width="fill_parent" />
<ListView android:id="@+id/android:list"
android:layout_weight="1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView android:id="@+id/android:empty"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/nothin"/>
</LinearLayout>
</ScrollView>
私はまた、0dpの高さを与えようとしましたが、これはどちらも失敗しました。誰にもアイデアはありますか?
編集は:相続いただきまし含まれている:
<LinearLayout android:id="@+id/header"
android:layout_width="fill_parent" android:layout_height="fill_parent" android:background="@drawable/headerbg"
xmlns:android="http://schemas.android.com/apk/res/android">
<ImageButton
android:id="@+id/headerButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/header"
android:background="@null"></ImageButton>
</LinearLayout>