You've already forked android_translation_layer
mirror of
https://gitlab.com/android_translation_layer/android_translation_layer.git
synced 2025-10-27 11:48:10 -07:00
add missing APIs related to scrolling
This commit is contained in:
@@ -2,12 +2,21 @@ package android.view.animation;
|
||||
|
||||
public class DecelerateInterpolator implements Interpolator{
|
||||
|
||||
public DecelerateInterpolator(float value) {}
|
||||
private float factor = 1.0f;
|
||||
|
||||
public DecelerateInterpolator(float value) {
|
||||
factor = value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public float getInterpolation(float input) {
|
||||
// TODO Auto-generated method stub
|
||||
throw new UnsupportedOperationException("Unimplemented method 'getInterpolation'");
|
||||
float result;
|
||||
if (factor == 1.0f) {
|
||||
result = 1.0f - (1.0f - input) * (1.0f - input);
|
||||
} else {
|
||||
result = 1.0f - (float)Math.pow((1.0f - input), 2 * factor);
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user