J'ai une table qui a une bordure autour de chacune des rangées de la table. J'ai un problème avec la partie frontière lorsque le texte d'une colonne passe sur une deuxième ligne, contrairement au texte de l'autre colonne. Cela fait que la ligne qui n'a pas le texte enveloppé sur une deuxième ligne soit plus courte et un arrière-plan noir sur la deuxième ligne. Comment puis-je obtenir cette rangée à la même hauteur que l'autre rangée?Problème de bordure TableLayout Android
Mon code est:
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:background="#013567" >
<TableLayout
android:id="@+id/tableLayout1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:shrinkColumns="*"
android:stretchColumns="*" >
<TableRow
android:id="@+id/tableRow2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#000" >
<TextView
android:id="@+id/textView2"
android:layout_margin="2dip"
android:background="#013567"
android:gravity="center"
android:text="long text abc 123 ong tex ong tex"
android:textColor="#fff" >
</TextView>
<TextView
android:id="@+id/textView3"
android:layout_margin="2dip"
android:background="#013567"
android:gravity="center"
android:text="short text"
android:textColor="#fff" >
</TextView>
</TableRow>
<TableRow
android:id="@+id/tableRow2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#000" >
<TextView
android:id="@+id/textView2"
android:layout_margin="2dip"
android:background="#013567"
android:gravity="center"
android:text="short text"
android:textColor="#fff" >
</TextView>
<TextView
android:id="@+id/textView3"
android:layout_margin="2dip"
android:background="#013567"
android:gravity="center"
android:text="long text abc 123 ong tex ong tex"
android:textColor="#fff" >
</TextView>
</TableRow>
</TableLayout>
</ScrollView>
Exemple:
joindre quelques captures d'écran ... – waqaslam
http://i.imgur.com/EMk3d.png Désolé, j'ai essayé de l'ajouter plus tôt, mais je ne pouvais pas pour une raison quelconque. – Howli