I want to create a custom interpolate to apply translate animation where the animation should go through the following function:
public static float easeIn(float t,float b , float c, float d) {
return c*(t/=d)*t + b;
}
where :
t: current time
b: start value
c: change in value
d: duration
I have found one to implement scale animation where if take only one parameter:
import android.view.animation.Interpolator;
public class MyInterpolator implements Interpolator {
public MyInterpolator() {
}
public float getInterpolation(float t) {
float x = 2.0f * t - 1.0f;
return 0.5f * (x * x * x + 1.0f);
}
}
how create in interpolate to make translate using the above function.