當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。