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

How to set default category?

Hi, I used the VideoPlayer template and have everything working. We have 5 categories. For some reason, when it loads on the TV, it always defaults to focusing on category #4 of 5. I want it to focus on category #3 so it's in the center. Where do I find the code to change this?
0 Kudos
1 REPLY 1
destruk
Streaming Star

Re: How to set default category?

It might not work, but you could try setfocusedlistitem() SetFocusToFilterBanner() or Setfocusedlist() before or after the show().
https://sdkdocs.roku.com/display/sdkdoc/ifPosterScreen

I have seen some issues with a gridscreen and these types of commands depending on what I do in the code with a gridscreen. There isn't much of a guarantee that a firmware update won't break what you set up here in the future - but for now you could rearrange your category feed so that the default highlighted option is 4th in your list so it has what you want to be there.
0 Kudos