1 /*
2  * Copyright (C) 2010 The Android Open Source Project
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 package android.animation;
18 
19 /**
20  * A time interpolator defines the rate of change of an animation. This allows animations
21  * to have non-linear motion, such as acceleration and deceleration.
22  */
23 public interface TimeInterpolator {
24 
25     /**
26      * Maps a value representing the elapsed fraction of an animation to a value that represents
27      * the interpolated fraction. This interpolated value is then multiplied by the change in
28      * value of an animation to derive the animated value at the current elapsed animation time.
29      *
30      * @param input A value between 0 and 1.0 indicating our current point
31      *        in the animation where 0 represents the start and 1.0 represents
32      *        the end
33      * @return The interpolation value. This value can be more than 1.0 for
34      *         interpolators which overshoot their targets, or less than 0 for
35      *         interpolators that undershoot their targets.
36      */
getInterpolation(float input)37     float getInterpolation(float input);
38 }
39