Java library which helps to work with (www.ipfx.org) animation interpolators. Feel free to contribute!
- go to (http://ipfx.org/)
- create interpolator function
- copy generated url (data is encoded in the url)
- pass url as a parameter to Interpolator.parseUrl() method
import org.ipfx.Interpolator;
...
final Interpolator interpolator = Interpolator.parseUrl(urlData);
...
float y = interpolator.calc(x);
...
final Interpolator interpolator = Interpolator.parseUrl(urlData);
ObjectAnimator animator = ObjectAnimator.ofFloat(testButton, View.Y, startY, endY);
animator.setDuration(1000);
animator.setInterpolator(new TimeInterpolator() {
@Override
public float getInterpolation(float input) {
return interpolator.calc(input);
}
});
animator.start();