I'm developing an app for TV platform and I faced with a problem when default RecyclerView
with GridLayoutManager
can not handle focus control from DPAD correctly. It has the next problems:
To avoid this behaviour I'm using VerticalGridView
from leanback
library with additional code and it works almost perfect - no any problems and it works with mouse and keyboard. The only thing that I can not do - set up SpanSizeLoockup
as in "mobile" GridLayoutManager
, because there is no such functionality. I need this to use header views in my list with span size for whole width in the row. The LayoutManager
logic is too strange for understanding and I want to achieve this as easy as posible.
Question: How I can add SpanSizeLoockup
functionality to VerticalGridView
and do not break anything there?
The only thing that comes to mind - is to use custom view that represents one line in a list with a header, but this also can break focus logic.
Thanks in advance!
The short answer - it's not possible without hard modification of the source code.