LinearLayout horizontal ET vertical
Bonjour,
J'ai dans mon application un LinearLayout de ce type :
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
|
<LinearLayout
android:id="@+id/horizontal"
android:orientation="horizontal"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:gravity="center" >
<Button
android:id="@+id/button1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button de test de test de ergfetg ret f" />
<Button
android:id="@+id/button2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="Button" />
</LinearLayout> |
Les boutons s'affichent comme il le faudrait, les uns à côté des autres. Le problème, c'est qu'il arrive que l'écran soit trop petit pour qu'ils aient la place de s'afficher tous les deux au complet, et alors l'un deux deux disparaît.
Est-il possible de faire en sorte qu'ils s'affichent dans le Layout de manière horizontale lorsqu'ils ont la place, mais verticale s'ils sont trop grand ?
Merci d'avance,
7804j