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

Fitbit Simple Clock animation

ANSWERED
Spoiler
WARNING NEWBIE QUESTION !

Hi, i'm trying to find how the simple clock from Fitbit animate clock and stats. And can't find out how it's done.

 

At first i tought it was an animation (translate, ...) but i can't reproduce the effect : first click go out, second click goes back. But with this code, the first click is ignored :

<!-- fly-out -->
    <animate attributeName="y"  begin="click" from="50%" to="-50%" dur="2" />
    <!-- fly-in -->
    <animate attributeName="y"  begin="click" to="50%" from="-50%" dur="2" />

Then i've seen panorama view, but it's scrolling horizontaly.

 

Scrollview uses a scroll not a tap.

 

and cycleview is the closest but it's cycling (of course) and not going back and forth.

 

Can someone help me understand how to create a similar effect ?

As you may have understood i'm a newbie in javascript (and coding in general), my knowledge is limited to scratch (at school) and a simple old html (maybe a bit of turbo pascal when i was 15)

 

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

found great help (after a while) in this post : https://community.fitbit.com/t5/SDK-Development/Animation-Help/td-p/2686726

 

it works with a bit of tweaking.

View best answer in original post

Best Answer
0 Votes
2 REPLIES 2

Well i understand that there is no simple way to do this effect.

 

I think i will go for a variable that alternate between to state. The first click will make this variable go 1 and is used to translate in position 1 and on second click variable=2 and position 2.

 

If someone can point me an example of such programming ? it could help me a lot.

Best Answer
0 Votes

found great help (after a while) in this post : https://community.fitbit.com/t5/SDK-Development/Animation-Help/td-p/2686726

 

it works with a bit of tweaking.

Best Answer
0 Votes