11-10-2017 10:51
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-10-2017 10:51
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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.

Accepted Solutions
11-12-2017 04:00 - edited 11-12-2017 04:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


11-12-2017 04:00 - edited 11-12-2017 04:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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";

11-12-2017 04:00 - edited 11-12-2017 04:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


11-12-2017 04:00 - edited 11-12-2017 04:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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";

