Bonjour

Je souhaite positionner deux TextView dans un linearLayout Vertical.
Celui utilise tout l'espace disponible de l'activité.

Un textView sera disposé en bas de l'activité et centré horizontalement ;
l'autre sera centré horizontalement et verticalement dans l'espace
restant au dessus du premier textView.

Je lutte et je ne trouve pas comment ; j'ai fixé la gravité à Bottom pour le
premier TextView mais il ne vas pas en bas.

Ci dessous le code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/LinearLayout1"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:baselineAligned="false"
    android:orientation="vertical"
    tools:context=".MainActivity" >
 
    <TextView
        android:id="@+id/TextView1"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="center_vertical|center_horizontal|center"
        android:text="@string/hello_world" />
 
    <TextView
        android:id="@+id/TextView2"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_gravity="bottom"
        android:text="@string/hello_world" />
 
</LinearLayout>
Je ne comprends pas pourquoi cela ne fonctionne pas.
Une idée ?

Merci
Henri