我正在使用基本的RecyclerView和GridLayoutManager。我观察到smoothScrollToPosition
和scrollToPosition
都不能正常工作。
a) 使用smoothScrollToPosition
时,我经常会从RecyclerView
收到错误提示:
"RecyclerView﹕Passed over target position while smooth scrolling."
RecyclerView
没有正确滚动(通常是错过目标行)。这种情况在我尝试滚动到某一行的第一项时最常见。
b) 当使用scrollToPosition
时,它似乎运行得很好,但大多数情况下,我只能看到该行的第一项,其余内容未显示。
你能给我一些提示如何使其中至少一个方法正常工作吗?
非常感谢!