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

Empty row in the top of roGridScreen (first row is empty)

Hi Joel,
Please find the attached screen shots
https://drive.google.com/file/d/0B9SpvR ... sp=sharing
https://drive.google.com/file/d/0B9SpvR ... sp=sharing

Can you please let me know why is the first row empty always, the season1 should be appeared in the first row, but it is appearing in the second row, is it the expected behavior?

here is my code:

function createSeasonsScreen(item as object)

gridstyle = "flat-landscape"
screenFacade=preShowSeasonGridScreen(gridstyle)

screenFacade.show()
showSeasonGridScreen(screenFacade, gridstyle, item)

end function


Function preShowSeasonGridScreen(style as string) As Object

m.season_port=CreateObject("roMessagePort")
season_screen = CreateObject("roGridScreen")
season_screen.SetMessagePort(m.season_port)
' screen.SetDisplayMode("best-fit")
season_screen.SetDisplayMode("(scale-to-fill")

season_screen.SetGridStyle(style)
return season_screen

End Function

Function showSeasonGridScreen(screen As Object, gridstyle as string, item as object)
seasons = []
seasons_row_style_list = []
asset_id = ""
bread_text = ""
if item.seasons <> invalid
asset_id = item.id
bread_text = "TV Shows"
else
linkRegex = CreateObject("roRegex", "/+", "")
assetObj = linkRegex.Split(item.link)
asset_id = assetObj[assetObj.count() - 1]
bread_text = "Home"
end if

assetDetail = getMovieDetail(asset_id)
screen.setupLists(assetDetail.seasons.count())
seasonsArray = CreateObject("roArray", assetDetail.seasons.count(), true)
mcnt = 0
for each season in assetDetail.seasons
seasons.Push(season.title)
print season.title
episodesArray = CreateObject("roArray", 1, true)
episodesArray.clear()
for each episode in season.episodes
episodeObj = CreateObject("roAssociativeArray")
'episodeObj.ContentType = "episode"
episodeObj.Title = episode.title
'episodeObj.HDPosterUrl = "http://" + imgUrl[1]
episodeObj.HDPosterUrl = episode.images[0].link+"/210x158"
'episodeObj.HDPosterUrl = "http://placeholdit.imgix.net/~text?txtsize=34&txt=Action&w=210&h=270&bg=32425B&txtclr=fff&txtfont=bold"
'episodeObj.SDPosterUrl = "http://" + imgUrl[1]
episodeObj.Description = episode.description
episodesArray.push(episodeObj)
'seasons_row_style_list.Push("landscape")
end for
screen.SetContentList(mcnt, episodesArray)
mcnt = mcnt+1
end for

screen.SetBreadcrumbEnabled(true)

screen.SetBreadcrumbText(bread_text, item.title)
screen.SetListNames(seasons)
'screen.SetListPosterStyles(seasons_row_style_list)

while true
print "Waiting for message"
msg = wait(0, m.season_port)
print "Got Message:";type(msg)
if type(msg) = "roGridScreenEvent" then
print "msg= "; msg.GetMessage() " , index= "; msg.GetIndex(); " data= "; msg.getData()
if msg.isListItemFocused() then
print"list item focused | current show = "; msg.GetIndex()
else if msg.isListItemSelected() then
row = msg.GetIndex()
selection = msg.getData()
print "list item selected row= "; row; " selection= "; selection
asset = assetDetail.seasons[row].episodes[selection]
asset.tv_series_title = assetDetail.title
showSpringboardScreen(asset)
else if msg.isScreenClosed() then
return ""
end if
end if
end while
End Function


please help me out.

Thanks,
Ramakanth.G
0 Kudos
1 REPLY 1
adscott
Visitor

Re: Empty row in the top of roGridScreen (first row is empty

I have the same issue with most of the "flat-" styles.
Changing to "four-column-flat-landscape" fixed it.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.