在exo recyclerview中播放最后一个视频

问题描述 投票:0回答:1

我正在使用exorecylerview,并且正在使用nestedscrollview加载更多数据或执行一些操作以了解回收者视图的位置。它正在播放回收站视图的最后一个视频,这是一个问题。我正在使用此代码

<LinearLayout
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    android:orientation="vertical"
    xmlns:android="http://schemas.android.com/apk/res/android">
  <android.support.v4.widget.NestedScrollView
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:id="@+id/myscroll">
  <com.androidwave.exoplayer.ui.ExoPlayerRecyclerView
      android:id="@+id/exoPlayerRecyclerView"
      android:layout_width="match_parent"
      android:layout_height="match_parent"
      android:background="#dedede"
      android:dividerHeight="8dp"
      />
  </android.support.v4.widget.NestedScrollView>
</LinearLayout>

但是当我删除嵌套滚动时,它将播放焦点对准的视频,所以我该如何解决此问题

android android-recyclerview exoplayer
1个回答
0
投票

我知道已经很晚了,但是可能会对其他人有所帮助。

您需要删除NestedScrollView,因为ExoPlayerRecyclerView没有获得自己的滚动,这就是为什么它无法检测视频的位置。

© www.soinside.com 2019 - 2024. All rights reserved.