本文整理了Java中android.animation.ObjectAnimator.getTarget()
方法的一些代码示例,展示了ObjectAnimator.getTarget()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectAnimator.getTarget()
方法的具体详情如下:
包路径:android.animation.ObjectAnimator
类名称:ObjectAnimator
方法名:getTarget
暂无
代码示例来源:origin: square/assertj-android
public ObjectAnimatorAssert hasTarget(Object target) {
isNotNull();
Object actualTarget = actual.getTarget();
assertThat(actualTarget) //
.overridingErrorMessage("Expected target <%s> but was <%s>.", target, actualTarget) //
.isSameAs(target);
return this;
}
}
代码示例来源:origin: ZieIony/Carbon
private static boolean hasSameTargetAndProperties(ObjectAnimator self, @Nullable Animator anim) {
if (anim instanceof ObjectAnimator) {
PropertyValuesHolder[] theirValues = ((ObjectAnimator) anim).getValues();
PropertyValuesHolder[] selfValues = self.getValues();
if (((ObjectAnimator) anim).getTarget() == self.getTarget() && selfValues.length == theirValues.length) {
final int length = selfValues.length;
for (int i = 0; i < length; ++i) {
PropertyValuesHolder pvhMine = selfValues[i];
PropertyValuesHolder pvhTheirs = theirValues[i];
if (pvhMine.getPropertyName() == null || !pvhMine.getPropertyName().equals(pvhTheirs.getPropertyName())) {
return false;
}
}
return true;
}
}
return false;
}
代码示例来源:origin: li2/learning-android-open-source
@Override
public void onAnimationEnd(Animator animation) {
balls.remove(((ObjectAnimator)animation).getTarget());
}
});
代码示例来源:origin: THEONE10211024/ApiDemos
public void onAnimationEnd(Animator anim) {
View view = (View) ((ObjectAnimator) anim).getTarget();
view.setScaleX(1f);
view.setScaleY(1f);
}
});
代码示例来源:origin: qiubiteme/android_api_demos
public void onAnimationEnd(Animator anim) {
View view = (View) ((ObjectAnimator) anim).getTarget();
view.setScaleX(1f);
view.setScaleY(1f);
}
});
代码示例来源:origin: THEONE10211024/ApiDemos
public void onAnimationEnd(Animator anim) {
View view = (View) ((ObjectAnimator) anim).getTarget();
view.setScaleX(1f);
view.setScaleY(1f);
}
});
代码示例来源:origin: LightSun/android-drag-FlowLayout
@Override
public void onAnimationEnd(Animator animation) {
// TODO Auto-generated method stub
super.onAnimationEnd(animation);
View view = (View) ((ObjectAnimator) animation).getTarget();
view.setScaleX(1f);
view.setScaleY(1f);
}
});
代码示例来源:origin: LightSun/android-drag-FlowLayout
@Override
public void onAnimationEnd(Animator animation) {
// TODO Auto-generated method stub
super.onAnimationEnd(animation);
View view = (View) ((ObjectAnimator) animation).getTarget();
view.setRotation(0.0f);
}
});
代码示例来源:origin: LightSun/android-drag-FlowLayout
@Override
public void onAnimationEnd(Animator animation) {
// TODO Auto-generated method stub
super.onAnimationEnd(animation);
View view = (View) ((ObjectAnimator) animation).getTarget();
view.setRotationY(0.0f);
}
});
代码示例来源:origin: THEONE10211024/ApiDemos
public void onAnimationEnd(Animator anim) {
View view = (View) ((ObjectAnimator) anim).getTarget();
view.setRotationX(0f);
}
});
代码示例来源:origin: LightSun/android-drag-FlowLayout
@Override
public void onAnimationEnd(Animator animation) {
// TODO Auto-generated method stub
super.onAnimationEnd(animation);
View view = (View) ((ObjectAnimator) animation).getTarget();
view.setRotationX(0.0f);
}
});
代码示例来源:origin: qiubiteme/android_api_demos
public void onAnimationEnd(Animator anim) {
View view = (View) ((ObjectAnimator) anim).getTarget();
view.setRotation(0f);
}
});
代码示例来源:origin: THEONE10211024/ApiDemos
public void onAnimationEnd(Animator anim) {
View view = (View) ((ObjectAnimator) anim).getTarget();
view.setRotationY(0f);
}
});
代码示例来源:origin: THEONE10211024/ApiDemos
public void onAnimationEnd(Animator anim) {
View view = (View) ((ObjectAnimator) anim).getTarget();
view.setRotation(0f);
}
});
代码示例来源:origin: THEONE10211024/ApiDemos
public void onAnimationEnd(Animator anim) {
View view = (View) ((ObjectAnimator) anim).getTarget();
view.setRotation(0f);
}
});
代码示例来源:origin: mime-mob/AndroidAdvanceAnimation
public RotateAnimator pivotX(float xPivot) {
checkObj();
Object target = animator.getTarget();
if(target != null && target instanceof View) {
View view = (View)target;
view.setPivotX(view.getWidth() * xPivot);
}
return this;
}
代码示例来源:origin: mime-mob/AndroidAdvanceAnimation
public ScaleAnimator pivotY(float yPivot) {
checkObj();
Object target = animator.getTarget();
if(target != null && target instanceof View) {
View view = (View)target;
view.setPivotY(view.getHeight() * yPivot);
}
return this;
}
代码示例来源:origin: TakuSemba/CropMe
@Override
public void move(float delta) {
View target = (View) animator.getTarget();
if (target != null) {
cancel();
animator.setInterpolator(null);
animator.setDuration(0);
animator.setFloatValues(target.getTranslationX() + delta);
animator.start();
}
}
代码示例来源:origin: mime-mob/AndroidAdvanceAnimation
public RotateAnimator pivot(float xPivot, float yPivot) {
checkObj();
Object target = animator.getTarget();
if(target != null && target instanceof View) {
View view = (View)target;
view.setPivotX(view.getWidth() * xPivot);
view.setPivotY(view.getHeight() * yPivot);
}
return this;
}
代码示例来源:origin: com.squareup.assertj/assertj-android
public ObjectAnimatorAssert hasTarget(Object target) {
isNotNull();
Object actualTarget = actual.getTarget();
assertThat(actualTarget) //
.overridingErrorMessage("Expected target <%s> but was <%s>.", target, actualTarget) //
.isSameAs(target);
return this;
}
}
内容来源于网络,如有侵权,请联系作者删除!