Possible en double:
XML Table layout? Two EQUAL-width rows filled with equally width buttons?Réglage de la largeur égale des colonnes dans la disposition de la table dans Android
J'utilise TableLayout
pour afficher la liste des données en 4 colonnes.
Description du problème:
Je suis incapable de définir la largeur égale de toutes les 4 colonnes, qui sont dans mon TableLayout
. Je mets mon code de mise en page, que je me sers ...
<TableLayout android:layout_width="fill_parent" android:layout_height="wrap_content" android:stretchColumns="0">
<TableRow>
<TextView android:text="table header1" android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textSize="10dip" android:textStyle="bold"/>
<TextView android:text="table header2" android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textSize="10dip" android:textStyle="bold"/>
<TextView android:text="table header3" android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textSize="10dip" android:textStyle="bold"/>
<TextView android:text="table header4" android:layout_width="wrap_content" android:layout_height="wrap_content"
android:textSize="10dip" android:textStyle="bold"/>
</TableRow>
</TableLayout>
Comment dois-je réécrire cette mise en page pour afficher 4 colonnes avec des tailles égales?
http://stackoverflow.com/q/2865497/778427 –
@Glendon Trullinger waoooo son fonctionnement. Merci. –