Comment régler maximale de l'étendue de la hauteur dans le soutien android design feuille inférieure?

Je l'ai déjà montré mon bas de la feuille de mise en page avec son coup d'oeil de la hauteur définie à 100dp. Mais comment puis-je limiter ma feuille inférieure de l'étendre à d'500dp seulement? C'est mon exemple de mise en page:

<android.support.design.widget.CoordinatorLayout
android:id="@+id/coordinator"
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:layout_width="match_parent"
android:layout_height="match_parent">

<fragment xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/map"
    android:name="com.google.android.gms.maps.SupportMapFragment"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    tools:context=".MapsActivity" />

<android.support.v4.widget.NestedScrollView
    android:id="@+id/design_bottom_sheet"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:background="#000000"
    app:behavior_hideable="true"
    app:behavior_peekHeight="100dp"
    app:layout_behavior="android.support.design.widget.BottomSheetBehavior">

    <LinearLayout
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:orientation="vertical">

        <TextView
            android:layout_width="match_parent"
            android:layout_height="100dp"
            android:layout_marginBottom="5dp"
            android:background="#e444ff" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="100dp"
            android:layout_marginBottom="5dp"
            android:background="#e444ff" />

        <TextView
            android:layout_width="match_parent"
            android:layout_height="100dp"
            android:layout_marginBottom="5dp"
            android:background="#e444ff" />

    </LinearLayout>

</android.support.v4.widget.NestedScrollView>

<android.support.design.widget.FloatingActionButton
    android:id="@+id/fab"
    android:layout_margin="@dimen/activity_horizontal_margin"
    app:layout_anchor="@+id/design_bottom_sheet"
    app:layout_anchorGravity="top|right|end"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content" />

</android.support.design.widget.CoordinatorLayout>

En plus de ma question, comment puis-je interdire à l'utilisateur de faire glisser le bas de la feuille en haut et en bas?

stackoverflow.com/a/49527832/3439133 vérifier dans le cas où vous souhaitez modifier dynamiquement la hauteur max

OriginalL'auteur Kirby Aster Abadilla | 2016-04-15