Ich möchte die modale Unterseite verwenden. Die Materialdesign-Richtlinie besagt, dass das vollständig erweiterte untere Blatt 8 dp unterhalb der Aktionsleiste sein sollte. Wie kann ich das erreichen? Ich möchte eine X
Markierung in der Aktionsleiste behalten, um die Unterseite zu schließen, wenn sie vollständig expandiert ist.Modal Bottom Sheet: wie 8dp von Action-Leiste?
Wenn ich mit einer linearenLayout-Unterseite versuchte, dauert es den ganzen Bildschirm, wenn der Zustand erweitert wird.
Mein bottomsheet Layout
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:elevation="@dimen/design_bottom_sheet_modal_elevation"
android:orientation="vertical">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"/>
<Button
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_marginRight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
android:text="ADD"/>
</LinearLayout>
Können Sie bitte Ihr XML zeigen? –
@abat, Hast du es geschafft, dies zu implementieren? – jzarsuelo
@jzarsuelo: sehe meine Antwort – abat