繁体   English   中英

如何在Android视图中应用横断面动画方程

[英]How to apply the transistion animation equation on view in android

如果我有这样的转移方程式:

 c*t/d + b

用于以下功能:

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

如何将此功能应用于android中的视图? 哪里:

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

此链接中类似。 要做的是在某些动画中移动视图(即按钮),如上面的链接所示,其中给出了动画数学方程式

看看Android Timer

在onTick方法上执行此操作

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

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM