Wie man eine maximale Höhe mit Wrap-Inhalt in Android einstellen?

Wie kann man in Android eine Scroll-Ansicht mit maximaler Höhe erstellen und Inhalte umbrechen? Im Grunde wird der Inhalt vertikal umbrochen, aber mit maximaler Höhe.

Ich habe es versucht

<ScrollView 
     android:id="@+id/scrollView1"
     android:layout_width="match_parent"
     android:layout_height="wrap_content"
         android:maxHeight="200dp"
     android:layout_alignParentBottom="true" >

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

    </LinearLayout>
</ScrollView>

Aber das funktioniert nicht?

Antworten auf die Frage(5)

Ihre Antwort auf die Frage