ich einen benutzerdefinierten Dialog mit einem Layout wie dieses:android individuelle Dialog mit Scroll drückt Tasten aus dem Bildschirm
<RelativeLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:id="@+id/mylayout">
<LinearLayout
android:id="@+id/title"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<TextView ... />
<TextView .../>
</LinearLayout>
<ScrollView
android:id="@+id/scrollView"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@+id/title">
<LinearLayout ...>
<TextView ...
android:text="lots of text........" />
<TextView .../>
</LinearLayout>
</ScrollView
<RelativeLayout ...
android:layout_below="@+id/scrollView">
<Button ...>
<Button ...>
</RelativeLayout>
</RelativeLayout>
Mein Problem ist, dass die Scroll das ist, wenn es zu viel Text in der Scrollview, die Die folgenden Schaltflächen werden aus dem Dialog gedrückt. Ich konnte das verhindern, indem ich das RelativeLayout, das die Buttons enthält, mit Android: layout_alignParentBottom = "true" verankere, aber ich dehne den gesamten Dialog bis zum unteren Bildschirmrand, wenn weniger Text in der Bildlaufleiste und Ich will das nicht.
Wie kann ich ein Layout wie diese:
[SOME TEXT]
[Scrollable region]
[Buttons]
Versuchen Sie, die Höhe des Haupt Layout Befestigung wie 300dip –
Ich möchte nicht über die Höhe des Haupt Layout beheben, weil es –