本文整理了Java中com.nineoldandroids.animation.ObjectAnimator.ofInt()
方法的一些代码示例,展示了ObjectAnimator.ofInt()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectAnimator.ofInt()
方法的具体详情如下:
包路径:com.nineoldandroids.animation.ObjectAnimator
类名称:ObjectAnimator
方法名:ofInt
[英]Constructs and returns an ObjectAnimator that animates between int values. A single value implies that that value is the one being animated to. Two values imply a starting and ending values. More than two values imply a starting value, values to animate through along the way, and an ending value (these values will be distributed evenly across the duration of the animation).
[中]构造并返回在int值之间设置动画的ObjectAnimator。单个值意味着该值就是要设置动画的值。两个值表示起始值和结束值。两个以上的值意味着一个起始值、一路上要设置动画的值和一个结束值(这些值将在动画持续时间内均匀分布)。
代码示例来源:origin: commonsguy/cw-omnibus
public void showLeft() {
translateWidgets(leftWidth, left, middle, right);
ObjectAnimator.ofInt(this, "middleWidth", leftWidth,
middleWidthNormal).setDuration(ANIM_DURATION)
.start();
}
代码示例来源:origin: commonsguy/cw-omnibus
public void hideLeft() {
if (leftWidth == -1) {
leftWidth=left.getWidth();
middleWidthNormal=middle.getWidth();
resetWidget(left, leftWidth);
resetWidget(middle, middleWidthNormal);
resetWidget(right, middleWidthNormal);
requestLayout();
}
translateWidgets(-1 * leftWidth, left, middle, right);
ObjectAnimator.ofInt(this, "middleWidth", middleWidthNormal,
leftWidth).setDuration(ANIM_DURATION).start();
}
代码示例来源:origin: ai212983/android-spinnerwheel
@Override
protected void initData(Context context) {
super.initData(context);
// creating animators
buildDimSelectorWheelAnimator();
mDimSeparatorsAnimator = ObjectAnimator.ofInt(this, PROPERTY_SEPARATORS_PAINT_ALPHA,
mSelectionDividerActiveAlpha, mSelectionDividerDimmedAlpha
);
// creating paints
mSeparatorsPaint = new Paint();
mSeparatorsPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_IN));
mSeparatorsPaint.setAlpha(mSelectionDividerDimmedAlpha);
mSelectorWheelPaint = new Paint();
mSelectorWheelPaint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.DST_IN));
}
代码示例来源:origin: dom4j1/Red
final ObjectAnimator heightAnimation = ObjectAnimator.ofInt(v, "xxx", new int[]{v.getHeight(), v.getWidth() / 2});
heightAnimation.setDuration(duration);
heightAnimation.addUpdateListener(new com.nineoldandroids.animation.ValueAnimator.AnimatorUpdateListener() {
ObjectAnimator animator = ObjectAnimator.ofInt(v, "xx", v.getWidth(), v.getWidth() / 2).setDuration(duration);
animator.addUpdateListener(new ObjectAnimator.AnimatorUpdateListener() {
@Override
代码示例来源:origin: peng8350/JPTabBar
changeAlpha(1f);
} else {
ObjectAnimator.ofInt(mSelectIcon, "alpha", 0, 255).setDuration(FILTER_DURATION).start();
ObjectAnimator.ofInt(mNormalIcon, "alpha", 255, 0).setDuration(FILTER_DURATION).start();
changeAlpha(0f);
} else {
ObjectAnimator.ofInt(mNormalIcon, "alpha", 0, 255).setDuration(FILTER_DURATION).start();
ObjectAnimator.ofInt(mSelectIcon, "alpha", 255, 0).setDuration(FILTER_DURATION).start();
代码示例来源:origin: vvinner/DragBottom
ObjectAnimator t=ObjectAnimator.ofInt(target,"backgroundColor",nowBgColor, Color.TRANSPARENT);
代码示例来源:origin: chiemy/LoadingImageView
private void initAnim() {
stopAnim();
//animator = ObjectAnimator.ofInt(this, "maskHeight", 0, imageHeight);
animator = ObjectAnimator.ofInt(clipDrawable, "level", 0, 10000);
animator.setDuration(animDuration);
animator.setRepeatCount(ValueAnimator.INFINITE);
animator.setRepeatMode(ValueAnimator.RESTART);
animator.addUpdateListener(new ValueAnimator.AnimatorUpdateListener() {
@Override
public void onAnimationUpdate(ValueAnimator animation) {
invalidate();
}
});
if(autoStart){
animator.start();
}
}
代码示例来源:origin: StannyBing/ZXUtils
ObjectAnimator bgAnim = ObjectAnimator.ofInt(mViewPager.getBackground(), "alpha", 0);
bgAnim.setDuration(duration);
bgAnim.start();
代码示例来源:origin: StannyBing/ZXUtils
ObjectAnimator bgAnim = ObjectAnimator.ofInt(mViewPager.getBackground(), "alpha", 0, 255);
bgAnim.setDuration(duration);
bgAnim.start();
内容来源于网络,如有侵权,请联系作者删除!