当前位置:网站首页>(Smooth)ScrollToPosition doesn't work properly with RecyclerView

(Smooth)ScrollToPosition doesn't work properly with RecyclerView

2022-06-24 23:27:00 Bustling city

problem :

I'm using basic RecyclerView with GridLayoutManager. I'm using GridLayoutManager Basic RecyclerView.I observed that nor smoothScrollToPosition nor scrollToPosition works properly. I observed smoothScrollToPosition and scrollToPosition Can't work properly .

a) when using smoothScrollToPosition I often receive error from RecyclerViewa) Use smoothScrollToPosition I often receive from RecyclerView error

"RecyclerView﹕ Passed over target position while smooth scrolling."“RecyclerView: Cross the target position when scrolling smoothly .”

and RecyclerView is not scrolled properly (often it misses the targeted row). also RecyclerView Incorrect scrolling ( The target line is usually missed ).This is observed mostly when I'm trying to scroll to the 1st item of some row This is mainly observed when I try to scroll to the first item of a line

b) when using scrollToPosition it seems to work quite ok but most of the time I can see only the 1st item of the row and the rest are not displayed.b) Use scrollToPosition It seems to work well , But most of the time I can only see the first item of the line , The rest are not shown .

Can you give me some hints how to make work properly at least one of the methods? Can you give me some tips on how to make at least one method work ?

Thanks a lot! Thank you very much !


Solution :

Reference resources : https://stackoom.com/en/question/25QNy
原网站

版权声明
本文为[Bustling city ]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202211132135483.html