Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Items outside viewport cannot be accessed with D-Pad on Android TV #576

Open
1 task done
mrdezzods opened this issue May 6, 2021 · 0 comments
Open
1 task done

Comments

@mrdezzods
Copy link

Issues and steps to reproduce

FlexboxLayoutManager has an issue with D-Pad scrolling. When the grid is scrolled with swipe (tested on emulator), items outside the initial viewport are displayed and can be scrolled to, but when navigating down or up with d-pad, items which were not initially loaded are not accessible

To reproduce the issue, create a RecyclerView and set LayoutParams(LayoutParams.MATCH_PARENT,LayoutParams.MATCH_PARENT) as layoutParams. Add FlexboxLayoutManager as its layout manager and add CardView as child presenter. Then add about 40 items in recyclersview's adapter.

Expected behavior

Viewport displays about 20 cards (5 columns, 4 rows). I expect it to scroll to items below when navigating with D-Pad

Version of the flexbox library

2.0.1

Link to code

val recyclerView = RecyclerView(parent.context, null).apply {
            layoutParams =
                ViewGroup.LayoutParams(ViewGroup.LayoutParams.MATCH_PARENT, ViewGroup.LayoutParams.MATCH_PARENT)
        }
recyclerView.layoutManager = FlexboxLayoutManager(parent.context)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant