imageviewとlistviewを2つの別々の相対レイアウトに配置しようとしていますが、imageviewに画像を追加すると、画像の高さが本来より低くなり、画像とlistviewの間に黒いスペースが追加されます。しかし、textviewを配置すると、正常に機能します。これがコードスニペットです。
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<RelativeLayout android:id="@+id/header"
android:layout_width="fill_parent"
android:layout_height="?android:attr/listPreferredItemHeight">
<ImageView
android:id="@+id/imageView1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"
android:layout_marginTop="-10dp"
android:src="@drawable/bar" />
</RelativeLayout>
<ListView
android:id="@+id/list11"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_marginTop="65dp"
android:cacheColorHint="#000000"
android:focusable="false"
android:listSelector="@color/itemcolor1"
android:scrollbars="vertical"
android:scrollingCache="false" >
</ListView>
</RelativeLayout>
みんなありがとう、それは迷惑です