spotify app navigation

梦想与她 提交于 2019-12-12 03:04:24

问题


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:


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



来源:https://stackoverflow.com/questions/8713228/spotify-app-navigation

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!