Interpolator.java revision 9066cfe9886ac131c34d59ed0e2d287b0e3c0087
1/* 2 * Copyright (C) 2006 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 17package android.view.animation; 18 19/** 20 * An interpolator defines the rate of change of an animation. This allows 21 * the basic animation effects (alpha, scale, translate, rotate) to be 22 * accelerated, decelerated, repeated, etc. 23 */ 24public interface Interpolator { 25 26 /** 27 * Maps a point on the timeline to a multiplier to be applied to the 28 * transformations of an animation. 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 */ 37 float getInterpolation(float input); 38 39} 40