Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
tsornin
Channel Surfer

Redraw RowList after updating content

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?

0 Kudos
2 REPLIES 2
Baradanikto
Roku Guru

Re: Redraw RowList after updating content

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.

FREE Windows desktop software for converting Direct Publisher channels to SceneGraph (SDK), for creating BIF (Trick Play) files, Roku (MRSS, JSON) feed files, and FireTV feed files @ GitHub/rrirower.
tsornin
Channel Surfer

Re: Redraw RowList after updating content

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...

0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.