问题
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