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

Hiding UI elements on "out of focus"

Hello,

 

I am working on a clockface that has many elements on the screen. Small circle elements, but many of them.

 

After reaching a certain number of these small dots (about a bit over half of what I am aiming for) when swiping down for the notification, there seems to be a certain level of lag manifesting.

 

Would like to hide some of the element whenever the clock is "of focus", the same way the it works in the clockface named "Flare" by fitbit. I assume they needed to do it for a similar reason.

Was searching around for something similar like the "focusout" event that can be used in javascript. But was wondering how could I implement this for a clockface.

 

Any ideas are more than welcome.

Best Answer
0 Votes
3 REPLIES 3

I suspect that focusout is linked to a HTML event that isn't triggered by Fitbit's SVG.

 

See if Appbit onunload() is called in the situation you need.

 

If you need to hide (or do anything else) with a bunch of elements simultaneously, it can be quicker to wrap them in a <svg> tag and manipulate that instead. However, this is an all-or-nothing option.

Peter McLennan
Gondwana Software
Best Answer
0 Votes

That was exactly my line of thought as well, and yes everything I wish to hide is inside a single <svg> element.

 

I will give a Appbit interface a look, thank for the tip.

Best Answer

Sadly none of the events work for what I am looking for.

 

If you have any idea on how could this be done on the Flare clockface, it would be much appreciated.

Best Answer
0 Votes