¿Sabéis cómo puedo adaptar el ListView al item? es decir, se me adapta automáticamente pero el último elemento es un TextView adaptado al contenido. Y el ListView no se adapta a este contenido sino que llega hasta el final del TextView.
Y el ListView llega simplemente hasta aquí:
Este es mi código xml (ItemList)
Código:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ImageView
android:id="@+id/imgvImagen"
android:layout_width="80dp"
android:layout_height="80dp"
android:padding="8dp"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true"
android:contentDescription="@string/imageDescription"
android:src="@drawable/film" />
<TextView
android:id="@+id/tvPalabra"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_marginLeft="14dp"
android:layout_marginTop="16dp"
android:layout_toRightOf="@+id/imgvImagen"
android:text="PALABRA"
android:textStyle="bold"
android:textAppearance="?android:attr/textAppearanceLarge" />
<TextView
android:id="@+id/tvPista"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignBottom="@+id/imgvImagen"
android:layout_alignLeft="@+id/tvPalabra"
android:layout_alignParentRight="true"
android:layout_below="@+id/tvPalabra"
android:inputType="textMultiLine"
android:singleLine="false"
android:text="Pista"
android:textAppearance="?android:attr/textAppearanceMedium" />
</RelativeLayout>
Y este el código de mi ListView:
Código:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent" >
<ListView
android:id="@+id/ltvLista"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentLeft="true"
android:layout_alignParentTop="true" >
</ListView>
</RelativeLayout>