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: 
kelweb87
Visitor

RowList stacking components?

I'm running into a strange issue with my RowList component.

I have a RowList on a page with 1 row and multiple items within that row. Each item is made from a custom component (a simple group including a poster and a label). When each item is focussed i add a border to the bottom of the item and when selected it plays a video. This all works as expected, the problem is when i close the video and attempt to focus on the RowList again, it looks like all the items for the row have been added again and are stacked on top of the existing items. The previously selected item retains it's 'focused' state and shows the border even when scrolling through the other items in the row.

No re-fetching of the data is occurring and i even observed the content node of the RowList using the ObserveField method and verified that nothing was changing. The only thing that changed was the visibility being set from true to false and vice versa.

Anyone ever came across this or have any idea how to resolve it?
0 Kudos
2 REPLIES 2
joetesta
Roku Guru

Re: RowList stacking components?

Try resetting the rowlist by reassigning the same content prior to making it visible again.
aspiring
0 Kudos
destruk
Streaming Star

Re: RowList stacking components?

When you use ObserveField - make sure you are not telling it to observefield more than once.  Remember to unobservefield if you need to tell it to observefield again or it will fire each time in succession incrementing.
in other words if you have a routine which sets observefield, each time that routine runs it sets up an extra callback to it.  The second time it will execute the callback twice, the third time it will execute it three times - it gets real messy.  So either set it a single time in Init, or if you are manually setting it be sure to unset it/unobservefield when it executes.
Without seeing the code involved I'm only guessing, but perhaps when the focus changes to the videoplayer you could unobserve the field that redraws the overlays, and when focus switches back to the rowlist observe the field again.
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.