我有一个回收者视图我实施了Scroll到位置
final RecyclerView.SmoothScroller smoothScroller = new
LinearSmoothScroller(getActivity()) {
@Override
protected int getVerticalSnapPreference() {
return LinearSmoothScroller.SNAP_TO_START;
}
};
int pos = recyclerViewAdapter.getKeyPosition(marker);
if (pos >= 0 && pos <= recyclerViewAdapter.getItemCount()) {
smoothScroller.setTargetPosition(pos);
recyclerView.getLayoutManager().startSmoothScroll(smoothScroller);
}
接下来,当我滚动到位置时,顶部项目显示其半部分 它看起来像是重叠的
你能为此提供任何帮助。