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

Multi View SVG for Versa and Ionic

Hi Fitbit Community,

 

I'm experimenting in my development environment with the Multi View SVG files functionality, available on the SDK 4.0. I've found these three examples on GitHub that use it:

First example, the official one from Fitbit: https://github.com/Fitbit/sdk-multi-view

Second example: https://github.com/gaperton/ionic-views

Third example: https://github.com/SergioMorchon/fitbit-views

 

As far as I know the way we have to develop for specific devices was for example, use something like: index~300x300.gui for Versa and index~348x250.gui for Ionic. Now with the Multi View SVG funcionality, I don't think we can use this technique anymore. Correct? I'm thinking about rely on the css file, so styles~300x300.css for Versa and styles~348x250.css for Ionic. The question that I have is, what is the correct approach when using the Multi View SVG functionality and do you want to target specific devices?

 

Thanks in advance,

Best Answer
0 Votes
2 REPLIES 2

You can still use multiview when building for multiple devices.The resolution suffixes are stripped, so in the case you cite, using replaceSync with `index.gui` will select the right file for that device. The suffixes are stripped at build time resulting in a bundle of files per device.

Best Answer
0 Votes

Thank you!

Best Answer
0 Votes