Is there a way to make Roku redraw a row list completely? I am trying to refresh data from my content feed, and I’m resetting the rowlist’s .content from my content task. But this makes the UI on screen draw new rows/cells on top of the existing rows. I feel like I need to call a refresh/redraw somewhere, but I’m not finding anything like that.
Any suggestions on how to fix this?
Recently, I had a similar problem. I needed a way to add a new row to a rowList. I was able to accomplish this by using the following code fragment:
m.rowList.content.Update({
children: gridRows
}, true)
where "gridRows" is an array of additional items to add to the rowList. I don't know if this will help you since you are updating from a task.
Thanks for the tip. I tried this, but it does seem to (as you say) append the rows to the bottom. I really want to replace the existing content, or just update a single row. I can update a single item in a row without too much trouble, and I can actually insert a row without problems, but for example if I try to delete a row with this:
gridScreen.content.removeChildIndex(existingRow)
This leaves images from the deleted row rendered on top of the first row. (!?) The same thing happens if I use replaceChildren.
Maybe it's because all my rows are different sizes... I recalculate the row sizes after an add/delete, but that isn't helping with the rows-on-top-of-rows bug. The first row is a series of large banners that fill the width of the screen; the rest of the rows are smaller rectangles or square posters.
For now my only solution is the extreme one: I have to create a whole new rowList object, assign the new content to that, and make it visible (and the old one !visible).
It'd be nice if rowList could be updated in place without these graphics glitches! Hence the need for a "redraw" command...