11-10-2017 10:51
11-10-2017 10:51
I am trying to replicate the way buttons work for a fitibit exercise, on my own activity (Ps a sample of it would be great). Anyhow, I am experiencing a bit of an illogical behavior, and I was wondering if it is a bug.
Behavior 1:
If I set in the index,gui
<set href="combo-button-stroke" attributeName="display" to="inline"/>
then in the app index
myButton.style.display = "none";
Button is not displayed, and it does NOT work.
If I activate it using a function to
myButton.style.display = "inline";
then it works
Behavior 2:
If I set in the index.gui
<set href="combo-button-stroke" attributeName="display" to="none"/>
Button is not displayed, BUT it does work.
myButton.style.display = "inline"; or "none"
only change display or not, but it always works.
Feedback on this is welcome.
Answered! Go to the Best Answer.
Best Answer11-12-2017 04:00 - edited 11-12-2017 04:01
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
11-12-2017 04:00 - edited 11-12-2017 04:01
You're changing the style.display of the button, but you're calling <set> on just the stroke line of the button, not the button itself.
To hide the whole button, set the display property on the button.
<use id="myButton" href="#combo-button-upper-right" display="none">
Or via javascript
myButton.style.display = "none";
Best Answer11-12-2017 04:00 - edited 11-12-2017 04:01
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
11-12-2017 04:00 - edited 11-12-2017 04:01
You're changing the style.display of the button, but you're calling <set> on just the stroke line of the button, not the button itself.
To hide the whole button, set the display property on the button.
<use id="myButton" href="#combo-button-upper-right" display="none">
Or via javascript
myButton.style.display = "none";
Best Answer