sonnykr
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2015
07:56 AM
roGridScreen on roScreen
Hey All,
I am trying to make a hybrid app, where the app initially launches to a custom roScreen screen, and a button click will load the roGridScreen. But when I navigate back to the initial (custom screen), I am getting some weird screen which looks like this

Seems like the roGridScreen is not fully cleared. If I click the Back button which triggers
things go wrong.. Any idea on how to fix this? What am I doing wrong here?
I am trying to make a hybrid app, where the app initially launches to a custom roScreen screen, and a button click will load the roGridScreen. But when I navigate back to the initial (custom screen), I am getting some weird screen which looks like this

Seems like the roGridScreen is not fully cleared. If I click the Back button which triggers
msg.isScreenClosed()event, the app works fine. But if it is a
msg.isListItemSelected(), and try to close the gridScreen manually by
m.screen.close()
m.screen = invalid
msg = invalid
things go wrong.. Any idea on how to fix this? What am I doing wrong here?
4 REPLIES 4
belltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2015
10:55 AM
Re: roGridScreen on roScreen
Instead of invalidating the screen and message object when you get the IsListItemSelected event, why don't you just call m.screen.Close () at that point. This will cause an IsScreenClosed () event to be generated which you can handle as you do at present.


Roku Employee
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2015
06:18 PM
Re: roGridScreen on roScreen
Are you closing/invalidating the roScreen before opening the grid then rebuilding it after the grid closes?
http://sdkdocs.roku.com/display/sdkdoc/roScreen
Other screen components cannot be intermixed with roScreens as the roScreen display stack is maintained independently from the main screen component display stack. When the final roScreen component is closed, other screen components can be used again
http://sdkdocs.roku.com/display/sdkdoc/roScreen
belltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-09-2015
08:13 PM
Re: roGridScreen on roScreen
"RokuChris" wrote:
Are you closing/invalidating the roScreen before opening the grid then rebuilding it after the grid closes?Other screen components cannot be intermixed with roScreens as the roScreen display stack is maintained independently from the main screen component display stack. When the final roScreen component is closed, other screen components can be used again
http://sdkdocs.roku.com/display/sdkdoc/roScreen
I guess I've been doing it wrong too. I have an roScreen that launches an roSpringboardScreen. I've been able to go back and forth between the two without noticing any adverse side-effects. When I hit the Back key or press an on-screen 'Close' button on the roSpringboardScreen, it jumps right back with the roScreen in the same state it was in before. I've changed the code to invalidate the roScreen before launching the roSpringboard screen (and invalidating its message port too, otherwise the next roScreen I created gets key presses meant for the other screen). It still works, although I don't like the screen flicker that takes place when it returns from the roSpringboard screen as it's re-building the new roScreen. I suppose that's just an unavoidable consequence of mixing the two components in this way?
sonnykr
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-11-2015
12:01 PM
Re: roGridScreen on roScreen
RokuChris wrote:
Are you closing/invalidating the roScreen before opening the grid then rebuilding it after the grid closes?
My answer is no. I didnt invalidate roScreen before opening roGridScreen. Other screens like springBoardScreen (and more) works just fine even the roScreen is not disposed.
But I think I will try the above approach. Thanks Chris.