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: 

Recreate GridScreen on back button

Hi to all,

I have a little problem.

I want to recreate or recall or better repopulate the gridscreen on pressing back button without recalling the function.

The scenario is like this:

I have a grid screen with movies. Each movie has a detail screen.
When I'm in detail screen and I press back button I want to repopulate the grid screen with some new data, but I don't want to recall the function who creates the grid. Recalling that function with cause more depth in the application, and that is something that I don't want.
0 Kudos
1 REPLY 1
joetesta
Roku Guru

Re: Recreate GridScreen on back button

in my app we do this; the 'screen' object stays in the in background while we execute the function that displays the details screen (displayShowDetailScreen). Then that function returns the currently selected show so that the grid screen can update, like this:
m.curShow =  displayShowDetailScreen(  our selected parameters )
screen.SetFocusedListItem(row, m.curShow)

(our parameters include the category they're in, the number of their selection, the name of the row they've chosen, and an object containing all the elements from this row, that they can browse to from the details page.)

This is how the end of the displayShowDetailScreen function looks:
    return showIndex
End Function
aspiring
0 Kudos