J'ai cette disposition linéaire et à l'intérieur de la disposition linéaire j'ai plusieurs vues de texte. Maintenant, ce que je veux faire est d'afficher le texte d'information sur le côté gauche, puis la valeur à côté de lui, mais les valeurs doivent être alignées après le plus long texte d'information.Android UI comment aligner textviews?
Je ne vois pas comment je peux utiliser une autre disposition linéaire dans la disposition linéaire.
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_marginBottom="5dp"
android:layout_marginLeft="5dp"
android:orientation="vertical" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ff00ff"
android:text="Room:"
android:textSize="12dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ff00ff"
android:text="{value}"
android:textSize="12dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ff00ff"
android:text="Date:"
android:textSize="12dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ff00ff"
android:text="{value}"
android:textSize="12dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ff00ff"
android:text="Time:"
android:textSize="12dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ff00ff"
android:text="{value}"
android:textSize="12dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ff00ff"
android:text="Location"
android:textSize="12dp" />
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="#ff00ff"
android:text="{value}"
android:textSize="12dp" />
</LinearLayout>
comme une table html. Un avec le texte d'information et ensuite le suivant avec la valeur. Les vues de texte avec la valeur de texte doivent être alignées après le texte d'information le plus long.
Html équivalent
<table>
<tr>
<td>Room:</td>
<td>{value}</td>
</tr>
<tr>
<td>Date:</td>
<td>{value}</td>
</tr>
...
</table>
Est-il possible d'aligner ce en plus de mettre en une largeur fixe dp?