我在NestedScrollView Android中有Recycler视图,如何在滚动NestedScrollView时获取RecyclerView的当前项目位置
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/constraintMain"
android:layout_width="match_parent"
android:layout_height="match_parent">
android:layout_width="match_parent"
android:orientation="vertical"
android:layout_height="wrap_content">
android:id="@+id/imageView1"
android:layout_width="match_parent"
android:layout_height="55dp"
android:layout_marginBottom="5dp"
android:src="@drawable/logo" />
android:id="@+id/recycler_view_all"
android:layout_width="match_parent"
android:nestedScrollingEnabled="false"
android:layout_height="wrap_content"
android:scrollbars="vertical" />
那里
AddOnScrollListener
和
SetonScrollListener设置
功能是
不使用RecyclerView调用