在 Spotify 附带的人物应用程序中,当您单击用户照片时,它会通过将您带到不同的 uri 来从人员列表中加载新内容,因此使用导航按钮可以正确导航。
我有工作导航选项卡 ABC 如 Spotify 中所述具有事件侦听器的 UI 指南
sp.core.addEventListener("argumentsChanged", tabUpdate);
如果我单击 A,然后单击 B,则 CI 可以使用 Spotify 后退和前进按钮在选项卡中导航回来。
当我单击 A 时,它会给我一个结果列表 D,当我单击 D 中的结果时,它会加载新内容 E,而不更改选项卡。 我的问题是我应该如何导航回结果列表 D?
我无法再次单击 A,因为它已被选中。
还有其他事件我可以收听吗?我是否需要将 E 加载到新页面中,或者是否有更优雅的方式来执行我缺少的导航?
In the people app that comes with spotify when you click on a users photo it loads new content from the list of people by taking you to a differnt uri, as such the navigation works correctly using the navigation buttons.
I have working navigation tabs A B C as described in the spotify UI Guidelines that have an event listener
sp.core.addEventListener("argumentsChanged", tabUpdate);
If I click A then B then C I can navigate back through the tabs using the spotify back and forward buttons.
When I click A it gives me a list of results D, when I click on a result in D it loads new content E without changing the tab. My question is how should i go about navigating back to the list of results D?
I cant click on A again as it is already selected.
Is there another event I can listen for? Do I need to load E into a new page or is there a more elegant way of doing the navigation that I am missing?
发布评论
评论(1)
从指南:
您还可以以编程方式推送新状态,通过将 window.location 设置为 spotify:app:$APPNAME:arguments"。
您还可以在此处查看使用选项卡的应用程序的工作示例 https://github.com/ptrwtts/kitchensink
From the guidelines:
You can also push new states programmatically, by setting window.location to spotify:app:$APPNAME:arguments".
You can also see a working example of an app using tabs here https://github.com/ptrwtts/kitchensink