Adham
Adham

Reputation: 64904

How to apply the transistion animation equation on view in android

If I have transition equation like this:

 c*t/d + b

as used in the following function:

 public static float easeNone (float t,float b , float c, float d) {
                return c*t/d + b;
 }

how to apply this function for a view in android ? where:

t: current time
b: start value
c: change in value
d: duration 

Something like in this link . What want to do is to move view (i.e. button) in some animation as in the link above , where the animation math equation is given

Upvotes: 0

Views: 146

Answers (1)

dburner
dburner

Reputation: 1007

Take a look at Android Timer

At the onTick method do this

 public void onTick(long millisUntilFinished) {
          long time = totaltime - millisUntilFinished;
          float x = easeNone(time, your parameters);
      }

Upvotes: 1

Related Questions