I am trying to put imageview and listview in two separate relative layouts, but when I am adding image to imageview the height of image is less as it should be, it is adding some black space between image and listview. but when I put textview it works fine. here is code snippets ..
<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>
Thanks guys, it is annoying
try this…