title: How to add Listener for next , previous , rewind and forward in Exoplayer
body: <p>I am working on ExoPlayer, I want to customize the ExoPlayer and listen for the Event next, previous, rewind, forward so that when the user clicks the next button next video in the Playlist will be playing and when using previous the previous video in the playlist will be playing and so on. I am using the Custom Layout, it changes the design but not listen for these events(next, previous etc). here is my code:- </p>
  
  <pre><code>&lt;FrameLayout xmlns:android="http://schemas.android.com/apk/res/android"
  xmlns:tools="http://schemas.android.com/tools"
  xmlns:app="http://schemas.android.com/apk/res-auto"
  android:id="@+id/root"
  android:layout_width="match_parent"
  android:layout_height="match_parent"
  android:keepScreenOn="true"&gt;
  
  
  &lt;RelativeLayout
      android:layout_width="match_parent"
      android:layout_height="200dp"&gt;
  
      &lt;com.google.android.exoplayer2.ui.SimpleExoPlayerView
          android:id="@+id/player_view"
          android:layout_width="match_parent"
          android:layout_height="200dp"
          app:resize_mode="fill"
          app:controller_layout_id="@layout/custom_controls"
          app:player_layout_id="@layout/custom_player_view"
          app:surface_type="texture_view"/&gt;
  
      &lt;ProgressBar
          android:id="@+id/progressBar"
          android:layout_width="match_parent"
          android:layout_height="wrap_content"
          android:layout_centerInParent="true"
          android:visibility="gone"/&gt;
  &lt;/RelativeLayout&gt;
  
  
  
  
  &lt;android.support.v7.widget.RecyclerView
      android:id="@+id/recycler_view"
      android:layout_marginTop="220dp"
      android:layout_width="match_parent"
      android:layout_height="wrap_content"&gt;
  </code></pre>
  
  <p>
  </p>
  
  <p>I have added the list of Mediasource in  ConcatenatingMediaSource. It is working but I am to change the layout also, that why I need a listener for every control in ExoPlayer. I see this  <a href="https://stackoverflow.com/questions/40284772/exoplayer-2-playlist-listener">link</a>. So I  know onPositionDiscontinuity() method calls every time when the user clicks on next, previous, rewind, forward button in ExoPlayer But I want listener for each button so I can perform the appropriate action??</p>
  
  <p>thanks</p>