我正在使用 exorecylerview,我正在使用嵌套滚动视图来加载更多数据或执行一些操作以了解回收器视图位置。播放回收器视图的最后一个视频时出现问题。我正在使用此代码
<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>
但是当我删除嵌套滚动时,它会播放焦点上的视频,所以我该如何解决这个问题
我知道
已经很晚了,但它可能会帮助其他人。
您需要删除NestedScrollView,因为ExoPlayerRecyclerView没有自己的滚动,这就是为什么它无法检测到视频的位置。