ExoPlayer 播放器视图布局

ExoPlayer playerView layout

我正在使用 exoplayer 在片段中设置视频播放器。在片段中,视频位于顶部,后面是一个 textView 和一个按钮。但是播放器控制器与这样的视频重叠: enter image description here

下面是我的片段布局 xml:

    <ScrollView
    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">


<android.support.constraint.ConstraintLayout
    android:layout_width="match_parent"
    android:layout_height="wrap_content">

    <com.google.android.exoplayer2.ui.PlayerView
        android:id="@+id/playerView_step_video"
        android:layout_width="match_parent"
        android:layout_height="wrap_content"
        android:layout_marginEnd="8dp"
        android:layout_marginLeft="8dp"
        android:layout_marginRight="8dp"
        android:layout_marginStart="8dp"
        android:layout_marginTop="8dp"
        app:layout_constraintEnd_toEndOf="parent"
        app:layout_constraintStart_toStartOf="parent"
        app:layout_constraintTop_toTopOf="parent"/>

    <TextView
        android:id="@+id/textView_step_description"
        android:layout_width="0dp"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        app:layout_constraintEnd_toEndOf="@+id/playerView_step_video"
        app:layout_constraintStart_toStartOf="@+id/playerView_step_video"
        app:layout_constraintTop_toBottomOf="@+id/playerView_step_video" />

    <Button
        android:id="@+id/button_next_step"
        android:layout_width="wrap_content"
        android:layout_height="wrap_content"
        android:layout_marginTop="16dp"
        android:text="@string/next_step"
        app:layout_constraintStart_toStartOf="@+id/textView_step_description"
        app:layout_constraintTop_toBottomOf="@+id/textView_step_description" />


</android.support.constraint.ConstraintLayout>

</ScrollView>

尝试并更改它.. 删除滚动视图。

<com.google.android.exoplayer2.ui.SimpleExoPlayerView
    android:id="@+id/playerView_step_video"
    android:layout_width="match_parent"
    android:layout_height="wrap_content"
    android:layout_marginEnd="8dp"
    android:layout_marginLeft="8dp"
    android:layout_marginRight="8dp"
    android:layout_marginStart="8dp"
    android:layout_marginTop="8dp"
    app:layout_constraintEnd_toEndOf="parent"
    app:layout_constraintStart_toStartOf="parent"
    app:layout_constraintTop_toTopOf="parent"/>