Java 如何在exoplayer中显示和隐藏自定义控制器

Java 如何在exoplayer中显示和隐藏自定义控制器,java,android,kotlin,exoplayer,exoplayer2.x,Java,Android,Kotlin,Exoplayer,Exoplayer2.x,我有一个exoplayer,其子组件如下 <com.google.android.exoplayer2.ui.PlayerView android:id="@+id/id_exo_player_view" android:layout_width="match_parent" android:layout_height="200dp" android:backgrou

我有一个exoplayer,其子组件如下

<com.google.android.exoplayer2.ui.PlayerView
        android:id="@+id/id_exo_player_view"
        android:layout_width="match_parent"
        android:layout_height="200dp"
        android:background="@android:color/darker_gray"
        android:src="@android:drawable/ic_media_play"
        app:controller_layout_id="@layout/custom_exoplayer_controller"
        app:fastforward_increment="5000"
        app:resize_mode="fixed_height"
        app:rewind_increment="5000"
        app:show_buffering="when_playing"
        app:use_controller="true">
... 
...
              <ImageButton
                android:id="@+id/idExoVolumeUp"
                android:layout_width="wrap_content"
                android:layout_height="wrap_content"
                android:layout_gravity="center"
                android:layout_marginStart="100dp"
                android:background="#00000000"
                android:src="@drawable/exo_controls_rewind"
                android:visibility="gone"
                app:layout_constraintBottom_toBottomOf="parent"
                app:layout_constraintStart_toStartOf="parent"
                app:layout_constraintTop_toTopOf="parent" />
...
...
</com.google.android.exoplayer2.ui.PlayerView>


... 
...
...
...
我有一个自定义的布局来显示进度条和播放/暂停,只有默认的实现

custom_exoplayer_controller.xml

<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:id="@+id/id_exo_custom_controller"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <LinearLayout
        android:id="@+id/progressbar_layout"
...
...
...
</androidx.constraintlayout.widget.ConstraintLayout>

custom\u exoplayer\u controller.xml