listStyles = ["landscape","portrait", "portrait", "portrait"]
screen.SetGridStyle("mixed-aspect-ratio")
screen.SetListPosterStyles(listStyles)
"dustinhood" wrote:
Can someone elaborate on this?
I need 4 rows, the first 3 need to be portrait and the 4th needs to be landscape. I've tried the using the code below with no luck. Any suggestions?
BTW, I also have the ContentType of each item set to movie on the first 3 rows and episode on the 4th.
listStyles = ["landscape","portrait", "portrait", "portrait"]
screen.SetGridStyle("mixed-aspect-ratio")
screen.SetListPosterStyles(listStyles)
"TheEndless" wrote:"dustinhood" wrote:
Can someone elaborate on this?
I need 4 rows, the first 3 need to be portrait and the 4th needs to be landscape. I've tried the using the code below with no luck. Any suggestions?
BTW, I also have the ContentType of each item set to movie on the first 3 rows and episode on the 4th.
listStyles = ["landscape","portrait", "portrait", "portrait"]
screen.SetGridStyle("mixed-aspect-ratio")
screen.SetListPosterStyles(listStyles)
I believe you need to call SetupLists prior to calling SetListPosterStyles.
screen.setupLists(categoryList.count())
screen.SetListNames(categoryList)
listStyles = ["landscape","portrait", "portrait", "portrait"]
screen.SetGridStyle("mixed-aspect-ratio")
screen.SetListPosterStyles(listStyles)
Sub Main()
port = CreateObject("roMessagePort")
grid = CreateObject("roGridScreen")
grid.SetMessagePort(port)
rowTitles = CreateObject("roArray", 4, true)
for j = 0 to 3
rowTitles.Push("[Row Title " + j.toStr() + " ] ")
end for
grid.SetupLists(rowTitles.Count())
grid.SetListNames(rowTitles)
listStyles = ["landscape","portrait", "portrait", "portrait"]
grid.SetGridStyle("mixed-aspect-ratio")
grid.SetListPosterStyles(listStyles)
for j = 0 to 3
list = CreateObject("roArray", 10, true)
for i = 0 to 10
o = CreateObject("roAssociativeArray")
o.ContentType = "episode"
o.Title = "[Title" + i.toStr() + "]"
o.ShortDescriptionLine1 = "[ShortDescriptionLine1]"
o.ShortDescriptionLine2 = "[ShortDescriptionLine2]"
o.Description = ""
o.Description = "[Description] "
o.Rating = "NR"
o.StarRating = "75"
o.ReleaseDate = "[<mm/dd/yyyy]"
o.Length = 5400
o.Actors = []
o.Actors.Push("[Actor1]")
o.Actors.Push("[Actor2]")
o.Actors.Push("[Actor3]")
o.Director = "[Director]"
list.Push(o)
end for
grid.SetContentList(j, list)
end for
grid.Show()
while true
msg = wait(0, port)
if type(msg) = "roGridScreenEvent" then
if msg.isScreenClosed() then
return
else if msg.isListItemFocused()
print "Focused msg: ";msg.GetMessage();"row: ";msg.GetIndex();
print " col: ";msg.GetData()
else if msg.isListItemSelected()
print "Selected msg: ";msg.GetMessage();"row: ";msg.GetIndex();
print " col: ";msg.GetData()
endif
endif
end while
end Sub
We’re upgrading Roku Community to bring you a faster, more mobile-friendly experience. You may notice limited functionality or read-only access during this time. You will not be able to log in or post new comments or kudos during this time. Read more here.
Planned Downtime:
Community will be unavailable for up to 24–48 hours during the upgrade window during the week of May 12 and you may notice reduced functionality.
In the meantime, for additional assistance, visit our Support Site.
Thanks for your patience — we’re excited to share what’s next!