[英]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 ? 如何将此功能应用于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 (ie button) in some animation as in the link above , where the animation math equation is given
要做的是在某些动画中移动视图(即按钮),如上面的链接所示,其中给出了动画数学方程式
Take a look at Android Timer 看看Android Timer
At the onTick method do this 在onTick方法上执行此操作
public void onTick(long millisUntilFinished) {
long time = totaltime - millisUntilFinished;
float x = easeNone(time, your parameters);
}
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.