当前位置: 首页>>代码示例>>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;未经允许,请勿转载。