RecyclerView focus scrolling

后端 未结 1 1321
旧巷少年郎
旧巷少年郎 2020-12-10 06:52

I have a RecyclerView with usually two columns and up to eight. We use a lot of D-PAD navigation. We have a problem when scrolling, the focused item will jump from left to r

相关标签:
1条回答
  • 2020-12-10 07:42

    I reported this bug to AOSP issue tracker: issue 190526

    As I can see from source the issue is because GridLayoutManager uses LinearLayoutManager's implementation of onFocusSearchFailed() which is called when focus approaches the inner border of RecyclerView. LinearLayoutManager's implementation just offers first/last (depends on scrolling direction) element. Hence focus jumps to first/last element of new row.

    My workaround for this issue.

    0 讨论(0)
提交回复
热议问题