Android: le ScrollView à la verticale LinearLayout

Je suis en train de faire une application pour Android et j'essaie d'avoir une ScrollView à l'intérieur d'un LinearLayout mais quand j'essaie de le faire le ScrollView prendre tout l'espace et les éléments qui sont après le ScrollView dans le LinearLayout disparaître.

Par exemple:

Si la ScrollView n'est pas "complet":

Android: le ScrollView à la verticale LinearLayout

Si la ScrollView est "plein":

Android: le ScrollView à la verticale LinearLayout

Comme vous pouvez le voir, le bouton disparait...

Voici le code de cette Activité:

<LinearLayout
    android:id="@+id/linearLayout1"
    android:layout_width="fill_parent"
    android:layout_marginLeft="50dp"
    android:layout_height="wrap_content"
    android:layout_centerHorizontal="true"
    android:layout_centerVertical="true"
    android:orientation="vertical"
    android:focusable="true"
    android:focusableInTouchMode="true"
    android:background="@drawable/linearlayoutbackground" >

    <TextView
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:text="@string/nom_des_joueurs"
        android:textAppearance="?android:attr/textAppearanceLarge"
        android:layout_marginBottom="30dp" />

    <ScrollView
        android:id="@+id/scrollView1"
        android:layout_width="match_parent"
        android:layout_height="wrap_content">

        <LinearLayout
            android:id="@+id/llPlayersName"
            android:layout_width="match_parent"
            android:layout_height="match_parent"
            android:orientation="vertical"
             >

        </LinearLayout>

    </ScrollView>

    <Button
        android:id="@+id/okPlayersName"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:text="@string/ok"
        android:background="@drawable/backgroundbutton"
        android:layout_marginTop="30dp" />
</LinearLayout>

Après je ajouter des éléments dans le LinearLayout qui sont dans la ScrollView.

Toute solution?

Merci.

InformationsquelleAutor kakko76 | 2012-08-26