Closed woyl closed 1 year ago
版本号是多少?检查下你的Adapter中焦点问题
滑动到底部,选择最后一个项目刷新警惕的时候,会自动往上滚动一段距离
问下怎么解决的,我也遇到了莫名其妙
好像4.x都会,我现在用的的4.1.4 只要滑动到底部,并执行adapter.notifyItemChanged(position)会自动往上滚动一段距离。 可能跟ConstraintLayout有关 <androidx.recyclerview.widget.RecyclerView android:id="@+id/recycler_view" android:layout_width="match_parent" android:layout_height="0dp" android:clipToPadding="false" android:paddingHorizontal="16dp" android:paddingTop="6dp" android:paddingBottom="16dp" app:layout_constraintBottom_toBottomOf="parent" app:layout_constraintTop_toBottomOf="@+id/ly_header" app:layout_constraintBottom_toTopOf="@+id/ly_footer" />
当我把paddingBottom改成15dp就能解决该问题
想要4.x都会,我现在用的4.1.4 只要滑动到底部,并执行adapter.notifyItemChanged(position)会自动往上滚动一段距离。 可能跟ConstraintLayout有关 <androidx.recyclerview.widget.RecyclerView android:id ="@+id/recycler_view" android:layout_width="match_parent" android:layout_height="0dp" android:clipToPadding="false" android:paddingHorizontal="16dp" android:paddingTop="6dp" android:paddingBottom="16dp" 应用程序:layout_constraintBottom_toBottomOf =“父” 应用程序:layout_constraintTop_toBottomOf =“@ + id / ly_header” 应用程序:layout_constraintBottom_toTopOf =“@ + id / ly_footer”/>
当我把 paddingBottom 改成 15dp 就能解决该问题
我找到我这里的原因了,很奇怪的,提了issues,地址https://github.com/scwang90/SmartRefreshLayout/issues/1554
滑动到底部,选择最后一两个item刷新适配器的时候,会自动往上滚动一段距离?