Android ListView toRightOf ImageView with different size without resizing image

I would like to have an Imageview (size 50dp / 50 dp) and to the right of this image, I would like to have a ListView (which has a variable size, depending on my database, but it’s not), the Image should keep its size, and the list must have its own size.

My problem: My ListView is at the top of my Imageview on the left. I want my list to be visible, without scrolling. All this code is placed in a RelativeLayout.

<LinearLayout
        android:id="@+id/listAddresses"
        android:layout_height="fill_parent"
        android:layout_width="fill_parent"
        android:layout_below="@id/AnotherImageWithListOnItsRight" >
        <RelativeLayout
            android:id="@+id/iconAddress"
            android:layout_width="50dp"
            android:layout_height="fill_parent" >
            <ImageView
                android:layout_height="50dp"
                android:layout_width="50dp"
                android:src="@drawable/orange_message" android:scaleType="fitXY"
                />
        </RelativeLayout>
        <ListView 
            android:layout_toRightOf="@id/iconAddress"
            android:id="@+id/listAddressTrue" 
            android:layout_height="fill_parent"
            android:layout_width="fill_parent"
            android:divider="#FFCC00"
            android:dividerHeight="4px" >      
        </ListView>
</LinearLayout>

I also managed to get a complete ListView without scrolling, but if I do, the height of my image is terrible ... So I thought I could make a RelativeLayout dedicated to my image, so my image would not be resized, but that didn't work.

- ?

PS: ..

+3
2

:

<ListView 
        android:layout_toRightOf="@id/iconAddress"

layout_toRightOf, , RelativeLayout, ListView LinearLayout

LinearLayout RelativeLayout ,

+2

.

<LinearLayout
        android:id="@+id/listAddresses"
        android:layout_height="fill_parent"
        android:layout_width="fill_parent"
        android:layout_below="@id/AnotherImageWithListOnItsRight" >
            <ImageView
                android:layout_height="50dp"
                android:layout_width="50dp"
                android:src="@drawable/orange_message" android:scaleType="fitXY"
                />
        <ListView 
            android:id="@+id/listAddressTrue" 
            android:layout_height="fill_parent"
            android:layout_width="0dp"
            android:layout_weight="1"
            android:divider="#FFCC00"
            android:dividerHeight="4px" >      
        </ListView>
</LinearLayout>
+2

All Articles