Placement bouton dans linear Layout
Bonjour,
Je commence a développer sur androïde avec éclipse.
Pour une petite application je voudrais mettre en place mes différents boutons dans un layout.
Comment faire pour positionner une textView en haut de l'écran et un bouton tout en bas ?
Actuellement le bouton est placé immédiatement en dessous du textView. Je ne voudrait pas passer par la déclaration des coordonnées pour une plus grande compatibilité avec tous les écran disponibles.
Ci-dessous mon fichier .xml.
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
| <?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
>
<TextView
android:id="@+id/ecran"
android:layout_width="fill_parent"
android:text="@string/hello"
android:layout_height="wrap_content"
/>
<Button android:id="@+id/Bouton"
android:textStyle="bold"
android:layout_height="wrap_content"
android:layout_width="200px"
android:text="Appuie pour voir"
android:layout_gravity="right"
/>
</LinearLayout> |