Java 类android.view.animation.BaseInterpolator 实例源码

项目:Carpaccio    文件:AnimationViewController.java   
protected static BaseInterpolator stringToInterpolator(String s) {
    if (s != null) {
        switch (s) {
            case ACCELERATE:
                return new AccelerateInterpolator();
            case DESCELERATE:
                return new DecelerateInterpolator();
            case ACCELERATE_DESCELERATE:
                return new AccelerateDecelerateInterpolator();
        }
    }
    return null;
}
项目:AndroidGenerator    文件:BallPathAnimator.java   
public BallPathAnimator(BaseInterpolator interpolator, Path path, int duration) {
  this.interpolator = interpolator;
  this.path = path;
  this.duration = duration;
  init();
}
项目:LoyalNativeSlider    文件:DescriptionAnimation.java   
/**
 * @param animation_behavior the interpolator behavior
 */
@TargetApi(Build.VERSION_CODES.LOLLIPOP_MR1)
public DescriptionAnimation(BaseInterpolator animation_behavior) {
    this.animation_behavior = animation_behavior;
}
项目:LoyalNativeSlider    文件:DescriptionAnimation.java   
/**
 * @param min_sec            additional setting minute second that controls the time threadhold between each slide
 * @param animation_behavior the interpolator behavior
 */
@TargetApi(Build.VERSION_CODES.LOLLIPOP_MR1)
public DescriptionAnimation(int min_sec, BaseInterpolator animation_behavior) {
    this.time_threadhold = min_sec;
    this.animation_behavior = animation_behavior;
}
项目:LoginArt    文件:TranslateAnimationHelper.java   
/**
 * Initialize parameters and properties for TranslateAnimation.
 *
 * @param viewToAnimate View on which translate animation will be performed
 * @param fromXDelta Change in X coordinate to apply at the start of the
 *        animation
 * @param toXDelta Change in X coordinate to apply at the end of the
 *        animation
 * @param fromYDelta Change in Y coordinate to apply at the start of the
 *        animation
 * @param toYDelta Change in Y coordinate to apply at the end of the
 *        animation
 * @param duration Duration in milliseconds.
 * @param startOffSet When this Animation should start, in milliseconds from
 *                    the start time of the root AnimationSet.
 * @param interpolator Sets the acceleration curve for this animation.
 */
public void init(@NonNull View viewToAnimate, float fromXDelta, float toXDelta, float fromYDelta, float toYDelta, long duration, long startOffSet, BaseInterpolator interpolator){
    mFromXDelta = fromXDelta;
    mToXDelta = toXDelta;
    mFromYDelta = fromYDelta;
    mToYDelta = toYDelta;
    mDuration = duration;
    mStartOffSet = startOffSet;
    mInterpolator = interpolator;
    mViewToAnimate = viewToAnimate;
}
项目:LoginArt    文件:TranslateAnimationHelper.java   
/**
 * Constructor to use when building a TranslateAnimation from code
 *
 * @param viewToAnimate View on which translate animation will be performed
 * @param fromXDelta Change in X coordinate to apply at the start of the
 *        animation
 * @param toXDelta Change in X coordinate to apply at the end of the
 *        animation
 * @param fromYDelta Change in Y coordinate to apply at the start of the
 *        animation
 * @param toYDelta Change in Y coordinate to apply at the end of the
 *        animation
 * @param interpolator Sets the acceleration curve for this animation.
 */
public TranslateAnimationHelper(@NonNull View viewToAnimate, float fromXDelta, float toXDelta, float fromYDelta, float toYDelta, BaseInterpolator interpolator){
    init(viewToAnimate, fromXDelta, toXDelta, fromYDelta, toYDelta, DEFAULT_DURATION, 0, interpolator);
    doTranslateAnimation();
}
项目:LoginArt    文件:TranslateAnimationHelper.java   
/**
 * Constructor to use when building a TranslateAnimation from code
 *
 * @param viewToAnimate View on which translate animation will be performed
 * @param fromXDelta Change in X coordinate to apply at the start of the
 *        animation
 * @param toXDelta Change in X coordinate to apply at the end of the
 *        animation
 * @param fromYDelta Change in Y coordinate to apply at the start of the
 *        animation
 * @param toYDelta Change in Y coordinate to apply at the end of the
 *        animation
 * @param startOffSet When this Animation should start, in milliseconds from
 *                    the start time of the root AnimationSet.
 * @param interpolator Sets the acceleration curve for this animation.
 */
public TranslateAnimationHelper(@NonNull View viewToAnimate, float fromXDelta, float toXDelta, float fromYDelta, float toYDelta, long startOffSet, BaseInterpolator interpolator){
    init(viewToAnimate, fromXDelta, toXDelta, fromYDelta, toYDelta, DEFAULT_DURATION, startOffSet, interpolator);
    doTranslateAnimation();
}
项目:LoginArt    文件:TranslateAnimationHelper.java   
/**
 * Constructor to use when building a TranslateAnimation from code
 *
 * @param viewToAnimate View on which translate animation will be performed
 * @param fromXDelta Change in X coordinate to apply at the start of the
 *        animation
 * @param toXDelta Change in X coordinate to apply at the end of the
 *        animation
 * @param fromYDelta Change in Y coordinate to apply at the start of the
 *        animation
 * @param toYDelta Change in Y coordinate to apply at the end of the
 *        animation
 * @param duration Duration in milliseconds.
 * @param startOffSet When this Animation should start, in milliseconds from
 *                    the start time of the root AnimationSet.
 * @param interpolator Sets the acceleration curve for this animation.
 */
public TranslateAnimationHelper(@NonNull View viewToAnimate, float fromXDelta, float toXDelta, float fromYDelta, float toYDelta, long duration, long startOffSet, BaseInterpolator interpolator){
    init(viewToAnimate, fromXDelta, toXDelta, fromYDelta, toYDelta, duration, startOffSet, interpolator);
    doTranslateAnimation();
}