Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Creating Multi-Page Layout for Complex Apps

ANSWERED

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?

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

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.

Peter McLennan
Gondwana Software

View best answer in original post

Best Answer
1 REPLY 1

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.

Peter McLennan
Gondwana Software
Best Answer