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

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

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

ObjectAnimator.setTarget介绍

[英]Sets the target object whose property will be animated by this animation
[中]设置其属性将由该动画设置动画的目标对象

代码示例

代码示例来源:origin: commonsguy/cw-omnibus

/**
 * Sets the target object for all current {@link #getChildAnimations() child animations}
 * of this AnimatorSet that take targets ({@link ObjectAnimator} and
 * AnimatorSet).
 *
 * @param target The object being animated
 */
@Override
public void setTarget(Object target) {
  for (Node node : mNodes) {
    Animator animation = node.animation;
    if (animation instanceof AnimatorSet) {
      ((AnimatorSet)animation).setTarget(target);
    } else if (animation instanceof ObjectAnimator) {
      ((ObjectAnimator)animation).setTarget(target);
    }
  }
}

代码示例来源:origin: com.nineoldandroids/library

/**
 * Sets the target object for all current {@link #getChildAnimations() child animations}
 * of this AnimatorSet that take targets ({@link ObjectAnimator} and
 * AnimatorSet).
 *
 * @param target The object being animated
 */
@Override
public void setTarget(Object target) {
  for (Node node : mNodes) {
    Animator animation = node.animation;
    if (animation instanceof AnimatorSet) {
      ((AnimatorSet)animation).setTarget(target);
    } else if (animation instanceof ObjectAnimator) {
      ((ObjectAnimator)animation).setTarget(target);
    }
  }
}

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

anim.setTarget(mMapView);
anim.addListener(new AnimatorListenerAdapter() {
  @Override

相关文章