当前位置: 首页>>代码示例>>Java>>正文


Java AnimatorSet.setInterpolator方法代码示例

本文整理汇总了Java中com.nineoldandroids.animation.AnimatorSet.setInterpolator方法的典型用法代码示例。如果您正苦于以下问题:Java AnimatorSet.setInterpolator方法的具体用法?Java AnimatorSet.setInterpolator怎么用?Java AnimatorSet.setInterpolator使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.nineoldandroids.animation.AnimatorSet的用法示例。


在下文中一共展示了AnimatorSet.setInterpolator方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: buildScaleDownAnimation

import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
/**
 * A helper method to build scale down animation;
 *
 * @param target
 * @param targetScaleX
 * @param targetScaleY
 * @return
 */
private AnimatorSet buildScaleDownAnimation(View target, float targetScaleX, float targetScaleY) {

    AnimatorSet scaleDown = new AnimatorSet();
    scaleDown.playTogether(
            ObjectAnimator.ofFloat(target, "scaleX", targetScaleX),
            ObjectAnimator.ofFloat(target, "scaleY", targetScaleY)
    );

    if (mUse3D) {
        int angle = scaleDirection == DIRECTION_LEFT ? -ROTATE_Y_ANGLE : ROTATE_Y_ANGLE;
        scaleDown.playTogether(ObjectAnimator.ofFloat(target, "rotationY", angle));
    }

    scaleDown.setInterpolator(AnimationUtils.loadInterpolator(activity,
            android.R.anim.decelerate_interpolator));
    scaleDown.setDuration(250);
    return scaleDown;
}
 
开发者ID:alicance,项目名称:MyScse-Client,代码行数:27,代码来源:ResideMenu.java

示例2: getPullDownAnimIn

import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
public Animator getPullDownAnimIn(View view) {

        ObjectAnimator in = ObjectAnimator.ofFloat(view, "translationY", -view.getMeasuredHeight(), 0);

        ObjectAnimator scaleY = ObjectAnimator.ofFloat(view, "scaleY", 0.6f, 1);
        ObjectAnimator scaleX = ObjectAnimator.ofFloat(view, "scaleX", 0.6f, 1);

        AnimatorSet set = new AnimatorSet();
        set.setInterpolator(new DecelerateInterpolator());
        in.setDuration(ANIMATION_DURATION);
        scaleY.setDuration(ANIMATION_DURATION);
        scaleX.setDuration(ANIMATION_DURATION);
        set.setDuration(ANIMATION_DURATION);
        set.playTogether(scaleY, scaleX, in);


        return set;
    }
 
开发者ID:zzz40500,项目名称:Android-PullToNextLayout,代码行数:19,代码来源:SimpleAnimation.java

示例3: getPullUpAnimIn

import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
private Animator getPullUpAnimIn(View view) {

        ObjectAnimator in =   ObjectAnimator.ofFloat(view, "translationY", view.getMeasuredHeight(), 0);
//        ObjectAnimator scaleY = ObjectAnimator.ofFloat(view, "rotationX", 20, 0);
        ObjectAnimator scaleY = ObjectAnimator.ofFloat(view, "scaleY", 0.6f, 1);
        ObjectAnimator scaleX = ObjectAnimator.ofFloat(view, "scaleX", 0.6f, 1f);
        AnimatorSet set = new AnimatorSet();
        set.setInterpolator(new DecelerateInterpolator());
        in.setDuration(ANIMATION_DURATION);
        scaleY.setDuration(ANIMATION_DURATION);
        scaleX.setDuration(ANIMATION_DURATION);
        set.setDuration(ANIMATION_DURATION);
        set.playTogether(scaleY, scaleX, in);


        return set;
    }
 
开发者ID:zzz40500,项目名称:Android-PullToNextLayout,代码行数:18,代码来源:SimpleAnimation.java

示例4: start

import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
private void start() {
    if (canAnimate()) {
        clearAnimation();
    }
    AnimatorSet animatorSet = new AnimatorSet();
    animatorSet.play(ObjectAnimator.ofFloat(this, "scaleX", 1.0f));
    animatorSet.play(ObjectAnimator.ofFloat(this, "scaleY", 1.0f));
    animatorSet.setInterpolator(new OvershootInterpolator());
    animatorSet.setDuration(getDuration());
    animatorSet.start();
}
 
开发者ID:Coffeeboys,项目名称:RenewPass,代码行数:12,代码来源:MaterialCompoundButton.java

示例5: setOpenCloseAnimation

import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
/**
 * Creates Open / Close AnimatorSet
 */
private AnimatorSet setOpenCloseAnimation(boolean isCloseAnimation) {
    List<Animator> textAnimations = new ArrayList<>();
    List<Animator> imageAnimations = new ArrayList<>();

    if (isCloseAnimation) {
        for (int i = getItemCount() - 1; i >= 0; i--) {
            fillOpenClosingAnimations(true, textAnimations, imageAnimations, i);
        }
    } else {
        for (int i = 0; i < getItemCount(); i++) {
            fillOpenClosingAnimations(false, textAnimations, imageAnimations, i);
        }
    }

    AnimatorSet textCloseAnimatorSet = new AnimatorSet();
    textCloseAnimatorSet.playSequentially(textAnimations);

    AnimatorSet imageCloseAnimatorSet = new AnimatorSet();
    imageCloseAnimatorSet.playSequentially(imageAnimations);

    AnimatorSet animatorFullSet = new AnimatorSet();
    animatorFullSet.playTogether(imageCloseAnimatorSet, textCloseAnimatorSet);
    animatorFullSet.setDuration(mAnimationDurationMilis);
    animatorFullSet.addListener(mCloseOpenAnimatorListener);
    animatorFullSet.setStartDelay(0);
    animatorFullSet.setInterpolator(new HesitateInterpolator());
    return animatorFullSet;
}
 
开发者ID:zongkaili,项目名称:MenuSet,代码行数:32,代码来源:MenuAdapter.java

示例6: end

import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
private void end() {
    if (canAnimate()) {
        clearAnimation();
    }
    AnimatorSet animatorSet = new AnimatorSet();
    animatorSet.play(ObjectAnimator.ofFloat(this, "scaleX", 0.85f));
    animatorSet.play(ObjectAnimator.ofFloat(this, "scaleY", 0.85f));
    animatorSet.setInterpolator(new OvershootInterpolator());
    animatorSet.setDuration(getDuration());
    animatorSet.start();
}
 
开发者ID:Coffeeboys,项目名称:RenewPass,代码行数:12,代码来源:MaterialCompoundButton.java

示例7: init

import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
private void init(Context context, AttributeSet attrs) {
	setOrientation(LinearLayout.HORIZONTAL);
	setGravity(Gravity.CENTER);
	handleTypedArray(context, attrs);
	mAnimationOut = (AnimatorSet) AnimatorInflater.loadAnimator(context, mAnimatorResId);
	mAnimationOut.setInterpolator(new LinearInterpolator());
	mAnimationIn = (AnimatorSet) AnimatorInflater.loadAnimator(context, mAnimatorResId);
	mAnimationIn.setInterpolator(new ReverseInterpolator());
}
 
开发者ID:iflove,项目名称:gank-examples,代码行数:10,代码来源:AnimIndicator.java

示例8: init

import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
private void init(Context context, AttributeSet attrs) {
    setOrientation(LinearLayout.HORIZONTAL);
    setGravity(Gravity.CENTER);
    handleTypedArray(context, attrs);
    mAnimationOut = (AnimatorSet) AnimatorInflater.loadAnimator(context, mAnimatorResId);
    mAnimationOut.setInterpolator(new LinearInterpolator());
    mAnimationIn = (AnimatorSet) AnimatorInflater.loadAnimator(context, mAnimatorResId);
    mAnimationIn.setInterpolator(new ReverseInterpolator());
}
 
开发者ID:woniukeji,项目名称:jianguo,代码行数:10,代码来源:AnimIndicator.java

示例9: getAnimator

import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
private Animator getAnimator(View target){
    AnimatorSet set = getEnterAnimtor(target);

    ValueAnimator bezierValueAnimator = getBezierValueAnimator(target);

    AnimatorSet finalSet = new AnimatorSet();
    finalSet.playSequentially(set);
    finalSet.playSequentially(set, bezierValueAnimator);
    finalSet.setInterpolator(mInterpolators[mRandom.nextInt(4)]);
    finalSet.setTarget(target);
    return finalSet;
}
 
开发者ID:HomHomLin,项目名称:AndroidEmanteAnimtor,代码行数:13,代码来源:EmanateView.java

示例10: getEnterAnimtor

import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
private AnimatorSet getEnterAnimtor(final View target) {

        ObjectAnimator alpha = ObjectAnimator.ofFloat(target, "alpha", 0.2f, 1f);
        ObjectAnimator scaleX = ObjectAnimator.ofFloat(target,"scaleX", 0.2f, 1f);
        ObjectAnimator scaleY = ObjectAnimator.ofFloat(target,"scaleY", 0.2f, 1f);
        AnimatorSet enter = new AnimatorSet();
        enter.setDuration(500);
        enter.setInterpolator(new LinearInterpolator());
        enter.playTogether(alpha,scaleX, scaleY);
        enter.setTarget(target);
        return enter;
    }
 
开发者ID:HomHomLin,项目名称:AndroidEmanteAnimtor,代码行数:13,代码来源:EmanateView.java

示例11: buildScaleDownAnimation

import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
/**
 * a helper method to build scale down animation;
 *
 * @param target
 * @param targetScaleX
 * @param targetScaleY
 * @return
 */
private AnimatorSet buildScaleDownAnimation(View target,float targetScaleX,float targetScaleY){

    AnimatorSet scaleDown = new AnimatorSet();
    scaleDown.playTogether(
            ObjectAnimator.ofFloat(target, "scaleX", targetScaleX),
            ObjectAnimator.ofFloat(target, "scaleY", targetScaleY)
    );

    scaleDown.setInterpolator(AnimationUtils.loadInterpolator(activity,
            android.R.anim.decelerate_interpolator));
    scaleDown.setDuration(250);
    return scaleDown;
}
 
开发者ID:dxjia,项目名称:GifAssistant,代码行数:22,代码来源:ResideMenu.java

示例12: getPullDownAnim

import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
public Animator getPullDownAnim(View showView, View dismissView) {
    Animator out = getPullDownAnimOut(dismissView);
    Animator in = getPullDownAnimIn(showView);
    AnimatorSet set = new AnimatorSet();
    set.setInterpolator(new DecelerateInterpolator());
    set.setDuration(ANIMATION_DURATION);
    set.playTogether(out, in);
    return set;
}
 
开发者ID:zzz40500,项目名称:Android-PullToNextLayout,代码行数:10,代码来源:SimpleAnimation.java

示例13: getPullUpAnim

import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
public Animator getPullUpAnim(View showView, View dismissView) {

        Animator out = getPullUpAnimOut(dismissView);

        Animator in =getPullUpAnimIn(showView);
        AnimatorSet set = new AnimatorSet();
        set.setDuration(ANIMATION_DURATION);
        set.setInterpolator(new DecelerateInterpolator());
        set.playTogether(out, in);

        return set;
    }
 
开发者ID:zzz40500,项目名称:Android-PullToNextLayout,代码行数:13,代码来源:SimpleAnimation.java

示例14: getDeleteItemShowAnimation

import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
public Animator getDeleteItemShowAnimation(View view) {
    ObjectAnimator scaleY = ObjectAnimator.ofFloat(view, "scaleY", 0.7f, 1);
    ObjectAnimator scaleX = ObjectAnimator.ofFloat(view, "scaleX", 0.7f, 1);
    AnimatorSet set = new AnimatorSet();
    set.setInterpolator(new DecelerateInterpolator());
    scaleY.setDuration(ANIMATION_DURATION);
    scaleX.setDuration(ANIMATION_DURATION);
    set.setDuration(ANIMATION_DURATION);
    set.playTogether(scaleY, scaleX);
    return set;
}
 
开发者ID:zzz40500,项目名称:Android-PullToNextLayout,代码行数:12,代码来源:SimpleAnimation.java

示例15: getDeleteItemAnim

import com.nineoldandroids.animation.AnimatorSet; //导入方法依赖的package包/类
@Override
public Animator getDeleteItemAnim(View showView, View dismissView) {

    Animator out = getDeleteItemDisMissAnimation(dismissView);

    Animator in =getDeleteItemShowAnimation(showView);
    AnimatorSet set = new AnimatorSet();
    set.setDuration(ANIMATION_DURATION);
    set.setInterpolator(new DecelerateInterpolator());
    set.playTogether(out, in);
    return set;
}
 
开发者ID:zzz40500,项目名称:Android-PullToNextLayout,代码行数:13,代码来源:SimpleAnimation.java


注:本文中的com.nineoldandroids.animation.AnimatorSet.setInterpolator方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。