Reference custom interpolator for viewing animations in XML

I have successfully written a new interpolator for animating the view, implementing an Interpolator interface like this.

 public class MyInterpolator implements Interpolator { public MyInterpolator() {} public float getInterpolation(float t) { return somefunction(t); } } 

I know that I can use this interpolator programmatically by creating an instance and passing it to the setInterpolator method of the Animation class.

But is there a way to use MyInterpolator in XML resources for my animations?

+6
source share
1 answer

We are looking for the same thing, I am faced with the fact that android provides support for this. Android Custom Interpolators

0
source

Source: https://habr.com/ru/post/956573/


All Articles