J'utilise une disposition de table pour placer l'ImageView, j'ajoute 5 imageView dans une rangée, maintenant je veux en fonction de la largeur de l'écran tous les ImageViews ajustent automatiquement la distance entre eux, comment je peux le faire , ma TableLayoutas ci-dessous. .Mise en page automatique Réglage de l'ImageView
<TableLayout android:id="@+id/tableLayout1" android:layout_width="match_parent" android:layout_height="match_parent" android:background="@drawable/transparent_background">
<TableRow android:id="@+id/tableRow1" android:layout_height="wrap_content" android:stretchColumns="*" android:layout_width="fill_parent">
<ImageView android:layout_height="wrap_content" android:id="@+id/imageView1" android:layout_width="wrap_content" android:src="@drawable/tea"></ImageView>
<ImageView android:layout_height="wrap_content" android:id="@+id/imageView2" android:layout_width="wrap_content" android:src="@drawable/bye" ></ImageView>
<ImageView android:layout_height="wrap_content" android:id="@+id/imageView3" android:layout_width="wrap_content" android:src="@drawable/brb" ></ImageView>
<ImageView android:layout_height="wrap_content" android:id="@+id/imageView4" android:layout_width="wrap_content" android:src="@drawable/pizza" ></ImageView>
<ImageView android:layout_height="wrap_content" android:id="@+id/imageView5" android:layout_width="wrap_content" android:src="@drawable/beer"></ImageView>
</TableRow>
<TableRow android:id="@+id/tableRow2" android:layout_width="wrap_content" android:layout_height="wrap_content"></TableRow>
<TableRow android:id="@+id/tableRow3" android:layout_width="wrap_content" android:layout_height="wrap_content"></TableRow>
<TableRow android:id="@+id/tableRow4" android:layout_width="wrap_content" android:layout_height="wrap_content"></TableRow>
</TableLayout>
Salut merci pour le guide, tournez à droite maintenant essayer GridView il remplit automatiquement la place restante dans une mise en page avec ima geView. . . – aftab