當前位置: 首頁>>代碼示例>>Java>>正文


Java Animator.AnimatorListener方法代碼示例

本文整理匯總了Java中android.animation.Animator.AnimatorListener方法的典型用法代碼示例。如果您正苦於以下問題:Java Animator.AnimatorListener方法的具體用法?Java Animator.AnimatorListener怎麽用?Java Animator.AnimatorListener使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在android.animation.Animator的用法示例。


在下文中一共展示了Animator.AnimatorListener方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: initAnimatorListener

import android.animation.Animator; //導入方法依賴的package包/類
private void initAnimatorListener() {
    mAnimatorListener = new Animator.AnimatorListener() {
        @Override
        public void onAnimationStart(Animator animation) {
            isBottomMenuAnimShowing = true;
        }

        @Override
        public void onAnimationEnd(Animator animation) {
            isBottomMenuAnimShowing = false;
        }

        @Override
        public void onAnimationCancel(Animator animation) {
            isBottomMenuAnimShowing = false;
        }

        @Override
        public void onAnimationRepeat(Animator animation) {

        }
    };
}
 
開發者ID:coderwjq,項目名稱:ZhaZhaShop,代碼行數:24,代碼來源:MainActivity.java

示例2: createAnimatorListener

import android.animation.Animator; //導入方法依賴的package包/類
private
@Nullable
Animator.AnimatorListener createAnimatorListener(final WXSDKInstance instance, @Nullable final String callBack) {
  if (!TextUtils.isEmpty(callBack)) {
    return new AnimatorListenerAdapter() {
      @Override
      public void onAnimationEnd(Animator animation) {
        if (instance == null || instance.isDestroy()) {
          WXLogUtils.e("RenderActionContextImpl-onAnimationEnd WXSDKInstance == null NPE or instance is destroyed");
        } else {
          WXSDKManager.getInstance().callback(instance.getInstanceId(),
                                              callBack,
                                              new HashMap<String, Object>());
        }
      }
    };
  } else {
    return null;
  }
}
 
開發者ID:weexext,項目名稱:ucar-weex-core,代碼行數:21,代碼來源:AnimationAction.java

示例3: endAnimation

import android.animation.Animator; //導入方法依賴的package包/類
@Override
public void endAnimation(DynamicWeatherView dynamicWeatherView, Animator.AnimatorListener listener) {
    super.endAnimation(dynamicWeatherView, listener);
    ValueAnimator animator = ValueAnimator.ofFloat(1, -1);
    animator.setDuration(1000);
    animator.setRepeatCount(0);
    animator.setInterpolator(new AccelerateInterpolator());
    animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
        @Override
        public void onAnimationUpdate(ValueAnimator animation) {
            hillTransFactor = (float) animation.getAnimatedValue();
        }
    });
    if (listener != null) {
        animator.addListener(listener);
    }
    animator.start();
}
 
開發者ID:li-yu,項目名稱:FakeWeather,代碼行數:19,代碼來源:OvercastType.java

示例4: fabAnimate

import android.animation.Animator; //導入方法依賴的package包/類
private void fabAnimate(int scale, Animator.AnimatorListener listener) {
    if (scale == fab.getAlpha()) {
        return;
    }

    ViewPropertyAnimator animator = fab.animate()
            .scaleX(scale)
            .scaleY(scale)
            .alpha(scale)
            .setDuration(300);

    if (listener != null) {
        animator.setListener(listener);
    }
    animator.start();
}
 
開發者ID:hetianpeng,項目名稱:shareApk,代碼行數:17,代碼來源:MainActivity.java

示例5: forEnd

import android.animation.Animator; //導入方法依賴的package包/類
@Contract("_ -> !null")
public static Animator.AnimatorListener forEnd(final OnAnimationEndListener endListener) {
    return new SimpleAnimatorListener() {
        @Override
        public void onAnimationEnd(Animator animation) {
            endListener.onAnimationEnd(animation);
        }
    };
}
 
開發者ID:Appolica,項目名稱:Flubber,代碼行數:10,代碼來源:SimpleAnimatorListener.java

示例6: forStart

import android.animation.Animator; //導入方法依賴的package包/類
@Contract("_ -> !null")
public static Animator.AnimatorListener forStart(final OnAnimationStartListener startListener) {
    return new SimpleAnimatorListener() {
        @Override
        public void onAnimationStart(final Animator animation) {
            startListener.onAnimationStart(animation);
        }
    };
}
 
開發者ID:Appolica,項目名稱:Flubber,代碼行數:10,代碼來源:SimpleAnimatorListener.java

示例7: playCombined

import android.animation.Animator; //導入方法依賴的package包/類
private void playCombined() {
    int longestMorphos = getLongestMorphos();
    int index = 0;
    if (this.swarmListener != null) {
        swarmListener.onSwarmStart();
    }
    for (Morpho m : swarm) {
        if (longestMorphos == index) {
            internalListener = new Animator.AnimatorListener() {
                @Override
                public void onAnimationStart(Animator animator) {

                }

                @Override
                public void onAnimationEnd(Animator animator) {
                    if (swarmListener != null) {
                        swarmListener.onSwarmEnd();
                    }
                }

                @Override
                public void onAnimationCancel(Animator animator) {

                }

                @Override
                public void onAnimationRepeat(Animator animator) {

                }
            };
        }
        index += 1;
        m.play(true, internalListener);
    }
}
 
開發者ID:rjsvieira,項目名稱:morphos,代碼行數:37,代碼來源:Swarm.java

示例8: forCancel

import android.animation.Animator; //導入方法依賴的package包/類
@Contract("_ -> !null")
public static Animator.AnimatorListener forCancel(final OnAnimationCancelListener cancelListener) {
    return new SimpleAnimatorListener() {
        @Override
        public void onAnimationCancel(Animator animation) {
            cancelListener.onAnimationCancel(animation);
        }
    };
}
 
開發者ID:Appolica,項目名稱:Flubber,代碼行數:10,代碼來源:SimpleAnimatorListener.java

示例9: play

import android.animation.Animator; //導入方法依賴的package包/類
private BaseViewAnimator play() {
    animator.setTarget(target);

    if (pivotX == YoYo.CENTER_PIVOT) {
        ViewCompat.setPivotX(target, target.getMeasuredWidth() / 2.0f);
    } else {
        target.setPivotX(pivotX);
    }
    if (pivotY == YoYo.CENTER_PIVOT) {
        ViewCompat.setPivotY(target, target.getMeasuredHeight() / 2.0f);
    } else {
        target.setPivotY(pivotY);
    }

    animator.setDuration(duration)
            .setRepeatTimes(repeatTimes)
            .setRepeatMode(repeatMode)
            .setInterpolator(interpolator)
            .setStartDelay(delay);

    if (callbacks.size() > 0) {
        for (Animator.AnimatorListener callback : callbacks) {
            animator.addAnimatorListener(callback);
        }
    }
    animator.animate();
    return animator;
}
 
開發者ID:weileng11,項目名稱:KUtils-master,代碼行數:29,代碼來源:YoYo.java

示例10: waterLoggingAlpha

import android.animation.Animator; //導入方法依賴的package包/類
public static void waterLoggingAlpha(final View view, final Animator.AnimatorListener listener) {
    ObjectAnimator anim = ObjectAnimator.ofFloat(view, "alpha", 0.1f, 1f);

    anim.setDuration(1200);// 動畫持續時間

    if(listener!=null) {
        anim.addListener(listener);
    }

    anim.start();
}
 
開發者ID:SavorGit,項目名稱:Hotspot-master-devp,代碼行數:12,代碼來源:SavorAnimUtil.java

示例11: setAnimatorListener

import android.animation.Animator; //導入方法依賴的package包/類
public FriskyShimmer setAnimatorListener(Animator.AnimatorListener animatorListener) {
    this.animatorListener = animatorListener;
    return this;
}
 
開發者ID:Dwijraj,項目名稱:FriskyImage,代碼行數:5,代碼來源:FriskyShimmer.java

示例12: removeListener

import android.animation.Animator; //導入方法依賴的package包/類
@Override
public FAnimatorSet removeListener(Animator.AnimatorListener listener)
{
    return (FAnimatorSet) super.removeListener(listener);
}
 
開發者ID:zj565061763,項目名稱:animator,代碼行數:6,代碼來源:FAnimatorSet.java

示例13: removeAnimatorListener

import android.animation.Animator; //導入方法依賴的package包/類
@SuppressWarnings("WeakerAccess") public void removeAnimatorListener(Animator.AnimatorListener listener) {
  animator.removeListener(listener);
}
 
開發者ID:alibaba,項目名稱:atlas,代碼行數:4,代碼來源:LottieDrawable.java

示例14: AnimatorListenerWrapper

import android.animation.Animator; //導入方法依賴的package包/類
public AnimatorListenerWrapper(Animator animator,
                               Animator.AnimatorListener listener) {
    mAnimator = animator;
    mListener = listener;
}
 
開發者ID:vpaliyX,項目名稱:Melophile,代碼行數:6,代碼來源:PauseLessAnimator.java

示例15: withListener

import android.animation.Animator; //導入方法依賴的package包/類
public AnimationComposer withListener(Animator.AnimatorListener listener) {
    callbacks.add(listener);
    return this;
}
 
開發者ID:weileng11,項目名稱:KUtils-master,代碼行數:5,代碼來源:YoYo.java


注:本文中的android.animation.Animator.AnimatorListener方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。