Gradually increase/decrease animation speed? [Android] -


i working on animated effect on android, know if there's other way gradually increase/decrease animation speed?

is possible specify first 3 second rate of change slow, , rest goes fast?

use interpolator. case recommend acceleratedecelerateinterpolator

animation anim = animationutils.loadanimation(this, r.anim.your_animation); anim.setinterpolator(new acceleratedecelerateinterpolator()); image.startanimation(anim); 

as interpolator, can build own!

public class myinterpolator extends interpolator {      public myinterpolator(int valuecount) {         super(valuecount);     }      public float getinterpolation (float input) {         return (float)(math.cos((input + 1) * math.pi) / 2.0f) + 0.5f;     } } 

using wolfram alpha can play parameters.


Popular posts from this blog

How to calculate SNR of signals in MATLAB? -

c# - Attempting to upload to FTP: System.Net.WebException: System error -

ios - UISlider customization: how to properly add shadow to custom knob image -