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

GridScreen 1 row landscape, 2 portrait (mixed-aspect-ratio)

I dont know why mixed-aspect-ratio not work correctly.
I try set first row (of gridscreen) with landscape style and second with portrait style.

    port = CreateObject("roMessagePort")   
screen = CreateObject("roGridScreen")
screen.SetMessagePort(port)
rowTitles = CreateObject("roArray", 10, true)
for j = 0 to 1
if j = 0 then
rowTitles.Push("FIRST")
end if
if j = 1 then
rowTitles.Push("SECOND")
end if
end for
screen.SetupLists(rowTitles.Count())
screen.SetListNames(rowTitles)

'=========== NOT WORK =========
screen.SetGridStyle("mixed-aspect-ratio")
listStyles = ["landscape","portrait"]
screen.SetListPosterStyles(listStyles)
'=========== NOT WORK =========

for j = 0 to 1
list = CreateObject("roArray", 10, true)
for i = 0 to 5
o = CreateObject("roAssociativeArray")
o.ContentType = "episode"
o.Title = "Nome"
o.Description = "Desc"
o.StarRating = ""
o.Length = 5400
if(j = 0) then
o.HDPosterUrl = "pkg:/images/poster_land.png"
o.SDPosterUrl = "pkg:/images/poster_land.png"
else
o.HDPosterUrl = "pkg:/images/poster_port.png"
o.SDPosterUrl = "pkg:/images/poster_port.png"
end if
list.Push(o)
end for
screen.SetContentList(j, list)
end for
Regards,
Patryk Rzucidlo (PTKDev)

Find me on social, forum and app with nickname "PTKDev".
Portfolio: http://www.ptkdev.it
Skype: ptkdev | Twitter: @ptkdev | LinkedIN: ptkdev | CurriculumVitae: http://cv.ptkdev.it
0 Kudos
2 REPLIES 2
TheEndless
Channel Surfer

Re: GridScreen 1 row landscape, 2 portrait (mixed-aspect-rat

You need to call SetGridStyle before calling SetupLists.
My Channels: http://roku.permanence.com - Twitter: @TheEndlessDev
Instant Watch Browser (NetflixIWB), Aquarium Screensaver (AQUARIUM), Clever Clocks Screensaver (CLEVERCLOCKS), iTunes Podcasts (ITPC), My Channels (MYCHANNELS)
0 Kudos
PTKDev
Visitor

Re: GridScreen 1 row landscape, 2 portrait (mixed-aspect-rat

"TheEndless" wrote:
You need to call SetGridStyle before calling SetupLists.

Solved, thanks!
Regards,
Patryk Rzucidlo (PTKDev)

Find me on social, forum and app with nickname "PTKDev".
Portfolio: http://www.ptkdev.it
Skype: ptkdev | Twitter: @ptkdev | LinkedIN: ptkdev | CurriculumVitae: http://cv.ptkdev.it
0 Kudos