08-07-2020 18:50
08-07-2020 18:50
I'm quite new to app development with Fitbit Studio, so my apologies if the answer to this question is really obvious. I've been working on an app that I would like to have several different pages as per the complex app setup shown in the blueprint samples on the Fitbit Development Guide, but I cannot seem to find a way to create dedicated separate pages or views within the SDK - as in separate pages of code for each page of the app which could be switched between. Am I overlooking something here, or is the only way to do this just to toggle showing and hiding all of the different elements from the different views within the same app?
Answered! Go to the Best Answer.
08-07-2020 19:07
08-07-2020 19:07
There are a few ways to do this. The easiest is probably a variation on the method you described: put all the elements for one page within a single <svg> and set the display attribute for that <svg>. Repeat for each page, putting each page's <svg> within the topmost <svg> in index.gui.
A more sophisticated approach is to the use multi-view feature. You can get even fancier and swap code in and out, but that's getting pretty tricky.
You should also have a look at the view components. One of those may suit you.
08-07-2020 19:07
08-07-2020 19:07
There are a few ways to do this. The easiest is probably a variation on the method you described: put all the elements for one page within a single <svg> and set the display attribute for that <svg>. Repeat for each page, putting each page's <svg> within the topmost <svg> in index.gui.
A more sophisticated approach is to the use multi-view feature. You can get even fancier and swap code in and out, but that's getting pretty tricky.
You should also have a look at the view components. One of those may suit you.