I'm new to developing a channel, no experience on programming but can pick up examples quick from the SDK download. I developed a channel from the samples and changed the images. I uploaded the video file to Roku box and the source file to the server. Im able to see the channel on Roku box but I dont like the way the layout grid looks after clicking on the channel button. Can i get the code that will make the grid screen look like the Netflix layout screen and let me know where to add it to.
SetGridStyle(String style) Sets the style or theme for displaying images in the grid screen. This allows different appearances of the overall grid for different sized images: * flat-movie – movie posters as seen in the Netflix channel (Default) Image sizes: SD 110x150 HD 210x270 SD 5 posters across, by 2 rows HD 5 posters across, by 2 rows
Search your brs files for "SetGridStyle" and take it from there if you find it. You'll want to set it with something like screen.SetGridStyle("Flat-Movie") to make it look like Netflix's choice.
'initialize theme attributes like titles, logos and overhang color initTheme()
gridstyle = "Flat-Movie"
'set to go, time to get started while gridstyle <> "" print "starting grid style= ";gridstyle screen=preShowGridScreen(gridstyle) gridstyle = showGridScreen(screen, gridstyle) end while
I merged the new files from the current sdk into my existing sdk work folder - so I'm not sure if the simplegrid example in the current SDK is the same as what I have.
The actual setting of the style is here: Function preShowGridScreen(style as string) As Object m.port=CreateObject("roMessagePort") screen = CreateObject("roGridScreen") screen.SetMessagePort(m.port) screen.SetDisplayMode("scale-to-fill") screen.SetGridStyle(style) return screen End Function
What I used is the example of the videoplayer zip file and source file. I uploaded the zip file to roku box and source to my server. I replaced the logos and have it connected to the server. I actually got the channel working but I liked the simplegrid look. I found the simplegrid.brs and looked at ur responce but I notice that my source file has multiple .brs files. Do i take the simplegrid.brs and replace a .brs file and rename it or copy to a certain .brs file or start from scratch (something i dont wanna do). Thanks again for your responce and being patient with me.
You'd need to merge the line(s) you need into your own source. Before you show your grid screen, to make it look like netflix 5 columns with 2 rows, you use screen.SetGridStyle("Flat-Movie") where screen is the handle to the CreateObject("roGridScreen") you are trying to display. If your gridscreen was working before, then that single adjustment should be all that you need.