com.nineoldandroids.animation.ObjectAnimator.addListener()方法的使用及代码示例

x33g5p2x  于2022-01-25 转载在 其他  
字(5.8k)|赞(0)|评价(0)|浏览(144)

本文整理了Java中com.nineoldandroids.animation.ObjectAnimator.addListener()方法的一些代码示例,展示了ObjectAnimator.addListener()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectAnimator.addListener()方法的具体详情如下:
包路径:com.nineoldandroids.animation.ObjectAnimator
类名称:ObjectAnimator
方法名:addListener

ObjectAnimator.addListener介绍

暂无

代码示例

代码示例来源:origin: navasmdc/MaterialDesignLibrary

animation = ObjectAnimator.ofFloat(progressView, "x", -progressView.getWidth()/2);
animation.setDuration(1200);
animation.addListener(new AnimatorListener() {

代码示例来源:origin: wangdan/AisenWeiBo

reveal.addListener(getRevealFinishListener(revealLayout));

代码示例来源:origin: navasmdc/MaterialDesignLibrary

final ObjectAnimator anim2 = ObjectAnimator.ofFloat(progressView, "x", getWidth());
anim2.setDuration(1200);
anim2.addListener(new AnimatorListener() {

代码示例来源:origin: Leaking/WeGit

public void setAnimationListener(AnimatorListener listener) {
  if (animatorListener != null) {
    transformation.removeListener(animatorListener);
  }
  if (listener != null) {
    transformation.addListener(listener);
  }
  animatorListener = listener;
}

代码示例来源:origin: canyinghao/CanEffect

public Animator getAnimator() {
  ObjectAnimator reveal = ObjectAnimator.ofFloat(this, "revealRadius", startRadius, endRadius);
  reveal.addListener(new Animator.AnimatorListener() {
    @Override
    public void onAnimationStart(Animator animator) {
      animationStart();
    }
    @Override
    public void onAnimationEnd(Animator animator) {
      animationEnd();
    }
    @Override
    public void onAnimationCancel(Animator animator) {
      animationEnd();
    }
    @Override
    public void onAnimationRepeat(Animator animator) {
    }
  });
  return reveal;
}

代码示例来源:origin: onlynight/LSearchView

public static AlphaSupportAnimator createAlphaAnimator(View view, float startAlpha, float endAlpha) {
    if (!(view instanceof AlphaAnimator)) {
      throw new IllegalArgumentException("View must be implements AlphaAnimator.");
    }

    AlphaAnimator alphaView = (AlphaAnimator) view;
    alphaView.setAlphaInfo(new AlphaAnimator.AlphaInfo(new WeakReference<>(view), startAlpha, endAlpha));
    ObjectAnimator alphaAnim = ObjectAnimator.
        ofFloat(alphaView, SearchViewBackgroundAnimator.BACKGROUND_ALPHA, startAlpha, endAlpha);
    alphaAnim.addListener(new AlphaAnimator.SimpleAnimationListener());
    return new SearchViewBackgroundAnimator(alphaView, alphaAnim);
  }
}

代码示例来源:origin: Leaking/WeGit

private void initAnimations(int transformDuration, int pressedDuration) {
  transformation = ObjectAnimator.ofFloat(this, transformationProperty, 0);
  transformation.setInterpolator(new DecelerateInterpolator(3));
  transformation.setDuration(transformDuration);
  transformation.addListener(new AnimatorListenerAdapter() {
    @Override public void onAnimationEnd(Animator animation) {
      transformationRunning = false;
      setIconState(animatingIconState);
    }
  });
  pressedCircle = ObjectAnimator.ofFloat(this, pressedProgressProperty, 0, 0);
  pressedCircle.setDuration(pressedDuration);
  pressedCircle.setInterpolator(new DecelerateInterpolator());
  pressedCircle.addListener(new AnimatorListenerAdapter() {
    @Override public void onAnimationEnd(Animator animation) {
      pressedProgressValue = 0;
    }
    @Override public void onAnimationCancel(Animator animation) {
      pressedProgressValue = 0;
    }
  });
}

代码示例来源:origin: dom4j1/Red

public void preAnim(final View v) {
  GradientDrawable drawable = (GradientDrawable) v.getBackground();
  drawable.setCornerRadius(0);
  ObjectAnimator anim = ObjectAnimator.ofFloat(v, "scaleX", new float[]{1f,1f});
  anim.setDuration(1);
  anim.addListener(new AnimatorListenerAdapter() {
    @Override
    public void onAnimationEnd(Animator animation) {
      super.onAnimationEnd(animation);
      start(v,700);
    }
  });
  anim.start();
}

代码示例来源:origin: tvbarthel/ChaseWhisplyProject

private void fadeOut(final View view) {
  final ObjectAnimator fadeOutAnimation = ObjectAnimator.ofFloat(view, "alpha", 1f, 0f).setDuration(500);
  fadeOutAnimation.addListener(new Animator.AnimatorListener() {
    @Override
    public void onAnimationStart(Animator animator) {
    }
    @Override
    public void onAnimationEnd(Animator animator) {
      view.setVisibility(View.GONE);
      fadeOutAnimation.removeListener(this);
    }
    @Override
    public void onAnimationCancel(Animator animator) {
      fadeOutAnimation.removeListener(this);
    }
    @Override
    public void onAnimationRepeat(Animator animator) {
    }
  });
  fadeOutAnimation.start();
}

代码示例来源:origin: Leaking/WeGit

reveal.addListener(getRevealFinishListener(revealLayout, bounds));

代码示例来源:origin: JmStefanAndroid/PVCloudGroupn

animator.addListener(new AnimatorListenerAdapter() {
  @Override
  public void onAnimationEnd(Animator animation) {

代码示例来源:origin: bzsome/VirtualApp-x326

mRadiusAnimator
    .setInterpolator(new AccelerateDecelerateInterpolator());
mRadiusAnimator.addListener(new Animator.AnimatorListener() {
  @Override
  public void onAnimationStart(Animator animator) {
mRadiusAnimator
    .setInterpolator(new AccelerateDecelerateInterpolator());
mRadiusAnimator.addListener(new Animator.AnimatorListener() {
  @Override
  public void onAnimationStart(Animator animator) {

代码示例来源:origin: darkskygit/VirtualApp

mRadiusAnimator
    .setInterpolator(new AccelerateDecelerateInterpolator());
mRadiusAnimator.addListener(new Animator.AnimatorListener() {
  @Override
  public void onAnimationStart(Animator animator) {
mRadiusAnimator
    .setInterpolator(new AccelerateDecelerateInterpolator());
mRadiusAnimator.addListener(new Animator.AnimatorListener() {
  @Override
  public void onAnimationStart(Animator animator) {

代码示例来源:origin: vvinner/DragBottom

move.setDuration(600);
if (animatorListenerAdapter != null) {
  move.addListener(animatorListenerAdapter);

代码示例来源:origin: dom4j1/Red

animator.addListener(new AnimatorListenerAdapter() {
  @Override
  public void onAnimationEnd(Animator animation) {

代码示例来源:origin: posm/OpenMapKitAndroid

anim.setDuration(zoomAndMove ? ANIMATION_DURATION_DEFAULT : ANIMATION_DURATION_SHORT);
anim.setTarget(mMapView);
anim.addListener(new AnimatorListenerAdapter() {
  @Override
  public void onAnimationStart(Animator animation) {
  anim.addListener(listener);

代码示例来源:origin: shiqikai/yykEmoji

anim1.addListener(new Animator.AnimatorListener() {
  @Override
  public void onAnimationStart(Animator animation) { }

相关文章