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

Using icon buttons on SDK version 4.0.2

So I am currently trying to use an icon button according to the documentation: https://dev.fitbit.com/build/guides/user-interface/svg-components/buttons/
but it does not seem to be working, and I think the docs are for a more recent version of the SDK (presumably 5.x) I also tried modifying this: https://community.fitbit.com/t5/SDK-Development/Simple-button-example/td-p/2639981 to work but no luck with that either. It seems as if this was one of the things that changed around a good bit in the migration, but even reversing the changes here didn't yield a new result: https://dev.fitbit.com/build/guides/migration/ (4.x to 5.0). A simple example or explanation would be great, many thanks
widgets.gui

<svg>
  <defs>
    <link rel="stylesheet" href="styles.css" />

    <link rel="import" href="/mnt/sysassets/widgets_common.gui" />

    <link rel="import" href="/mnt/sysassets/widgets/icon_button.gui"/>
  </defs>
</svg>


index.gui

  <use id="button-1" href="play.png" class="small-button application-fill plus-button" />


style.css

#button-1 {
  x: 30;
  y: 30;
}

 


Error in CLI

App: Error 2 Invalid path '/mnt/sysassets/widgets/icon_button.gui'
[12:20:48 PM]       App: Error 22 Invalid value ''                           (mnt/sysassets/widgets/icon_button.gui:1,1)
[12:20:48 PM]       App: Error 22 Could not find symbol 'play.png' in button-1                (resources/index.gui:11,1)
[12:20:48 PM]       App: Error 22 Undefined attribute 'href' in button-1


 

Best Answer
0 Votes
1 REPLY 1

Unfortunately the SDK5 components won't work on SDK4 devices.

 

You can find the old documentation on the waybackmachine. You want the icon button. https://web.archive.org/web/20191102093406/https://dev.fitbit.com/build/guides/user-interface/svg-co...

Best Answer