You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
402 B
18 lines
402 B
package com.example.PersonalCenter;
|
|
|
|
import android.view.animation.LinearInterpolator;
|
|
|
|
public class JellyInterpolator extends LinearInterpolator {
|
|
private float factor;
|
|
|
|
public JellyInterpolator() {
|
|
this.factor = 0.15f;
|
|
}
|
|
|
|
@Override
|
|
public float getInterpolation(float input) {
|
|
return (float) (Math.pow(2, -10 * input)
|
|
* Math.sin((input - factor / 4) * (2 * Math.PI) / factor) + 1);
|
|
}
|
|
}
|