具有LinearSnapHelper和填充的Recyclerview

时间:2019-05-07 12:18:54

标签: android android-recyclerview

我有一个RecyclerView,它使用LinearSnapHelper来使物品居中。我可以使用smoothScrollToPosition(x)转到特定位置。但是现在我有一个问题,我不能选择第一个和最后一个项目。如果在RecyclerView的开头和结尾添加了填充,则可以选择它们,但是现在smoothScrollToPosition(x)滚动得太远了。如何在这里实现正确的行为?

0 个答案:

没有答案
相关问题