I'm working to add multiple rows per category to a Leanback (Android TV) project that I'm developing. I am however, seeing odd behavior in the way the rows are populated. The code I'm using works, it was from a tutorial, here:
The rows are loaded by passing them into a custom Presenter you create in the tutorial. Here is how that part functions:
int numRows = ((CustomListRow) item).getNumRows();
((ListRowPresenter.ViewHolder) holder).getGridView().setNumRows(numRows);
super.onBindRowViewHolder(holder, item);
When the gridView() gets populated at runtime, however, it populates the items from Top-to-bottom, rather than left-to-right. Is there a way to fix or adjust that behavior so they are added to the gridvew from left to right like the are supposed to be?
For better reference here are two screenshots. In both screenshots I'm loading the same set of items:
[1] A normal row. Items load from left-to-right
[2] The multiple row implementation. Items load from top-to-bottom
Aucun commentaire:
Enregistrer un commentaire