Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
krh5150
Level 7

PosterScreen Filter Banner

Hi,

I reviewed and tested the example code from the documentation for the PosterScreen using the filter category banner. However, how is a group of data loaded into each category? For example, you have a TV show with 3 seasons. Each season will have specific episodes. How are those episodes loaded into their specific seasons, if using the "season" as the category.....[Season 1, Season 2, Season 3]?

When testing the code from the documentation, it loads 10 episodes and not into any categories.

Thanks,
Kevin
0 Kudos
1 Reply
RokuChris
Roku Employee
Roku Employee

Re: PosterScreen Filter Banner

You need to manage that data in whatever way makes the most sense for your situation.

There are lots of different ways to do it, but one solution is to store the arrays of content-meta-data items in a parallel array such that they are ordered the same as the array you pass to SetListNames().

contentArrays = [
[{ title: "S1E1" }]
[{ title: "S2E1" }]
[{ title: "S3E1" }]
]


Then, you can populate a category by saying something like:

if msg.isListFocused()
index = msg.GetIndex()
screen.SetContentList(contentArrays[index])
0 Kudos