Spotify 应用导航

发布于 2024-12-24 17:52:28 字数 582 浏览 2 评论 0 原文

在 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?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

挽清梦 2024-12-31 17:52:28

指南

您还可以以编程方式推送新状态,通过将 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

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文