Je ne comprends pas très bien RelativeLayout, je ne comprenais pas pourquoi cette XML (il représente un élément d'un listview):Disposition relative
<?xml version="1.0" encoding="UTF-8"?>
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:background="@drawable/sfumatura_riga"
>
<ImageView
android:id="@+id/featured_new_image"
android:layout_alignParentLeft="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/no_foto"
/>
<LinearLayout
android:layout_toRightOf="@id/featured_new_image"
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginLeft="5dp"
>
<TextView
style="@style/featured_new_title"
android:id="@+id/featured_city"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_marginTop="10dp"
/>
<TextView
style="@style/featured_name_country"
android:id="@+id/featured_country"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
/>
</LinearLayout>
<TextView
style="@style/featured_date"
android:id="@+id/featured_date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_marginRight="5dp"
android:layout_alignParentRight="true"
/>
</RelativeLayout>
Je rencontre ce résultat, pourquoi trop de marge à le bas de la rangée?
Si vous avez essayé de modifier le layout_height de la mise en page relative à wrap_content, cela fonctionne-t-il? – xandy
je ne reçois rien de mal dans ce xml. –
J'ai essayé avec ce xandy, mais ne fonctionne pas! – pedr0