Roku 中的导航概念 [英] Navigation concept in Roku

查看:18
本文介绍了Roku 中的导航概念的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在 Roku Brightscript 的屏幕导航中遇到了一些问题.请任何人帮助我如何在我的 Roku 项目中管理 5-6 个屏幕.我想从 1 到 2 屏幕导航,也想从该屏幕返回.这是我在过去 6 个月中遇到的一些主要问题.我做不到.你那边的一些帮助有助于我理解.

I am facing some issue in screen navigation in Roku Brightscript. Please, anyone, help me how I can manage 5-6 screen in my Roku project. I want to navigate from 1 to 2 screen and also want to back from that screen. This is some major issue I have for the last 6 month. I am not able to do it. Some help from your side helps me to understand.

目前,我已经按照以下步骤进行了尝试

Currently, I have tried by following below procedure

1-如果我想进入 2 个屏幕,那么我会做下面的部分

1-if I want to go to 2 screens then I will do below part

   m.top.AppendChild(m.secondscreen)
   m.secondscreen.setFocus(true)
   m.secondscreen.visible="true"

2- 当我在第二个屏幕后退键中单击返回时,我会将其返回 false 以便返回到第一个屏幕,在这里我将执行此操作

2- when I click back then in a second-screen back key I will return it false So that it comes to 1st screen back and here I will just do this

   m.secondscreen.setFocus(false)
   m.secondscreen.visible="false"
   return true

这里将进入第一个屏幕.所以像这样,我将转到所有页面.但我知道这不是 Roku 的确切过程.所以我在这样做时遇到了很多困难.我无法按照上述程序从 5 个屏幕移动到 1 个屏幕所以如果你有的话,任何人都让我通过一些例子来理解.它会很感激你

Here it will come to the 1st screen. So like this, I will go to all pages. But I know this is not the exact process in Roku. So I have faced many difficulties by doing this.and I am not able to move from 5 screens to 1 screen by following the above procedure So anyone let me understand with some example if you have.it will be grateful to you

推荐答案

我假设你的 m.secondscreen 是一个roSGScreen"组件,如果是这样,你是正确的,你是不正确的.Roku 场景图应用程序应该只创建一个roSGScreen".

I assume your m.secondscreen is a "roSGScreen" component and if so, you are correct that you are incorrect. A Roku scenegraph application should only have one "roSGScreen" created ever.

屏幕"的概念令人困惑,因为当它们实际上只是视图时,您可以创建许多可以被认为是屏幕"的组件.您唯一的场景应该控制活动视图(子组件,而不是 roSGScreens),并且可以根据用户操作根据需要附加/分离或显示/隐藏子组件.

The concept of "screen" is confusing, because you can create many components that could be thought of as "screens" when they're actually just views. Your one and only scene should control the active views (subcomponents, not roSGScreens) and can attach / detach or show / hide the subcomponents as needed based on user action.

从技术上讲,我很确定您想要管理 5 个视图,而不是 5 个屏幕.

Technically speaking, I'm pretty certain that you want to manage 5 views, not 5 screens.

我建议花一些时间使用 SDK 文档教程中的示例应用程序以了解更多信息.

I suggest spending some time with the example application from the SDK docs tutorial to learn about this more.

这篇关于Roku 中的导航概念的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆