Android 如何使ConstraintLayout填充BottomSheetDialogFragment中的可见空间?

Android 如何使ConstraintLayout填充BottomSheetDialogFragment中的可见空间?,android,android-constraintlayout,Android,Android Constraintlayout,我正在制作一个相机取景器,它位于底部碎片的内部。这个片段开始填满屏幕。我使用的是一种约束布局,它将快门按钮置于水平居中的按钮处,问题是,当工作表对话框未完全展开时,您无法看到快门按钮。我想知道是否有一种方法可以使快门按钮在达到峰值时显示在底部,然后当纸张对话框展开时,快门会移到底部 如果我没有解释清楚或者想要更多的细节,请让我知道 以下是XML布局: <android.support.constraint.ConstraintLayout xmlns:android="http://sch

我正在制作一个相机取景器,它位于底部碎片的内部。这个片段开始填满屏幕。我使用的是一种约束布局,它将快门按钮置于水平居中的按钮处,问题是,当工作表对话框未完全展开时,您无法看到快门按钮。我想知道是否有一种方法可以使快门按钮在达到峰值时显示在底部,然后当纸张对话框展开时,快门会移到底部

如果我没有解释清楚或者想要更多的细节,请让我知道

以下是XML布局:

<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:id="@+id/photo_creator"
    android:layout_width="match_parent"
    android:layout_height="460dp">

    <TextureView
        android:id="@+id/photo_view_finder"
        android:layout_width="330dp"
        android:layout_height="0dp"
        app:layout_constraintBottom_toBottomOf="parent"
        app:layout_constraintHorizontal_bias="0.5"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent" />

    <ImageView
        android:id="@+id/photo_flash"
        android:layout_width="24dp"
        android:layout_height="24dp"
        android:layout_margin="8dp"
        android:contentDescription="@string/content_description"
        android:src="@drawable/ic_flash_off"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="@+id/photo_view_finder" />

    <ImageView
        android:id="@+id/photo_shutter"
        android:layout_width="50dp"
        android:layout_height="50dp"
        android:contentDescription="@string/content_description"
        android:onClick="takePhoto"
        android:src="@drawable/background_photo"
        app:layout_constraintBottom_toBottomOf="@+id/photo_view_finder"
        app:layout_constraintLeft_toLeftOf="parent"
        app:layout_constraintRight_toRightOf="parent"
        app:layout_constraintTop_toTopOf="parent"
        app:layout_constraintVertical_bias=".96" />

    <ImageView
        android:id="@+id/photo_switch"
        android:layout_width="36dp"
        android:layout_height="0dp"
        android:layout_marginStart="16dp"
        android:contentDescription="@string/content_description"
        android:onClick="switchCamera"
        android:src="@drawable/ic_camera_front"
        app:layout_constraintBottom_toBottomOf="@+id/photo_shutter"
        app:layout_constraintDimensionRatio="H,10:9"
        app:layout_constraintLeft_toRightOf="@+id/photo_shutter"
        app:layout_constraintTop_toTopOf="@+id/photo_shutter" />

</android.support.constraint.ConstraintLayout>


如果您添加了xml代码或迄今为止尝试过的内容,那么效果会很好。@Umair我已经添加了布局文件。我一直在想办法解决这个问题,但还没能想出任何可以尝试的办法。