0

I'm the developer of Fulguris Web Browser and I'm faced with a weird issue in my tab list which is using a RecyclerView.

When scrolling fast through those tab lists, either horizontal or vertical ones, items get stuck mid-flight as shown on below screenshot:

Broken tab list

That's hardly ever an issue when manually scrolling through the list. It mostly triggers when doing Ctrl+Tab which is using smoothScrollToPosition to move to the new current tab. It also seems to be more of an issue when under load like when loading web pages in the background.

Relevant source code can be found on GitHub.

Slion
  • 2,558
  • 2
  • 23
  • 27
  • Using scrollToPosition instead of smoothScrollToPosition fixes the issue. Looks like a nasty bug in smoothScrollToPosition implementation. – Slion Jan 21 '21 at 06:46
  • Actually I just tried again without item animator and with smooth scroll then it looks like the issue is gone too. It seems that's only a problem when using smooth scroll with item animator. That makes a lot more sense to me then. I wonder why I failed to see that earlier. – Slion Jan 21 '21 at 10:13
  • See also: https://stackoverflow.com/a/26748274/3969362 and search for fast scroll. – Slion Jan 21 '21 at 20:55

1 Answers1

0

That code base was using some custom ItemAnimator namely HorizontalItemAnimator and VerticalItemAnimator that were causing those issues. My understanding is that those classes were once parts of the AOSP, looks like they are long gone though.

Using DefaultItemAnimator which is obviously set by default on AndroidX RecyclerView fixes those issues.

Slion
  • 2,558
  • 2
  • 23
  • 27