本文整理了Java中android.animation.ObjectAnimator.setProperty()
方法的一些代码示例,展示了ObjectAnimator.setProperty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ObjectAnimator.setProperty()
方法的具体详情如下:
包路径:android.animation.ObjectAnimator
类名称:ObjectAnimator
方法名:setProperty
暂无
代码示例来源:origin: WireGuard/wireguard-android
LayoutParams(final ViewGroup.LayoutParams source) {
super(source);
mExpandDir.setInterpolator(EXPAND_INTERPOLATOR);
mExpandAlpha.setInterpolator(ALPHA_EXPAND_INTERPOLATOR);
mCollapseDir.setInterpolator(COLLAPSE_INTERPOLATOR);
mCollapseAlpha.setInterpolator(COLLAPSE_INTERPOLATOR);
mCollapseAlpha.setProperty(View.ALPHA);
mCollapseAlpha.setFloatValues(1f, 0f);
mExpandAlpha.setProperty(View.ALPHA);
mExpandAlpha.setFloatValues(0f, 1f);
switch (mExpandDirection) {
case EXPAND_UP:
case EXPAND_DOWN:
mCollapseDir.setProperty(View.TRANSLATION_Y);
mExpandDir.setProperty(View.TRANSLATION_Y);
break;
case EXPAND_LEFT:
case EXPAND_RIGHT:
mCollapseDir.setProperty(View.TRANSLATION_X);
mExpandDir.setProperty(View.TRANSLATION_X);
break;
}
}
代码示例来源:origin: florent37/RxAnimator
((ObjectAnimator) valueAnimator).setPropertyName(method);
} else if (viewProperty != null) {
((ObjectAnimator) valueAnimator).setProperty(viewProperty);
代码示例来源:origin: HelloChenJinJun/TestChat
public LayoutParams(ViewGroup.LayoutParams source) {
super(source);
mExpandDir.setInterpolator(sExpandInterpolator);
mExpandAlpha.setInterpolator(sAlphaExpandInterpolator);
mCollapseDir.setInterpolator(sCollapseInterpolator);
mCollapseAlpha.setInterpolator(sCollapseInterpolator);
mCollapseAlpha.setProperty(View.ALPHA);
mCollapseAlpha.setFloatValues(1f, 0f);
mExpandAlpha.setProperty(View.ALPHA);
mExpandAlpha.setFloatValues(0f, 1f);
switch (mExpandDirection) {
case EXPAND_UP:
case EXPAND_DOWN:
mCollapseDir.setProperty(View.TRANSLATION_Y);
mExpandDir.setProperty(View.TRANSLATION_Y);
break;
case EXPAND_LEFT:
case EXPAND_RIGHT:
mCollapseDir.setProperty(View.TRANSLATION_X);
mExpandDir.setProperty(View.TRANSLATION_X);
break;
}
}
代码示例来源:origin: Hankkin/TaoSchool
public LayoutParams(ViewGroup.LayoutParams source) {
super(source);
mExpandDir.setInterpolator(sExpandInterpolator);
mExpandAlpha.setInterpolator(sAlphaExpandInterpolator);
mCollapseDir.setInterpolator(sCollapseInterpolator);
mCollapseAlpha.setInterpolator(sCollapseInterpolator);
mCollapseAlpha.setProperty(View.ALPHA);
mCollapseAlpha.setFloatValues(1f, 0f);
mExpandAlpha.setProperty(View.ALPHA);
mExpandAlpha.setFloatValues(0f, 1f);
switch (mExpandDirection) {
case EXPAND_UP:
case EXPAND_DOWN:
mCollapseDir.setProperty(View.TRANSLATION_Y);
mExpandDir.setProperty(View.TRANSLATION_Y);
break;
case EXPAND_LEFT:
case EXPAND_RIGHT:
mCollapseDir.setProperty(View.TRANSLATION_X);
mExpandDir.setProperty(View.TRANSLATION_X);
break;
}
}
代码示例来源:origin: renhui/RichEditor
public LayoutParams(ViewGroup.LayoutParams source) {
super(source);
mExpandDir.setInterpolator(sExpandInterpolator);
mExpandAlpha.setInterpolator(sAlphaExpandInterpolator);
mCollapseDir.setInterpolator(sCollapseInterpolator);
mCollapseAlpha.setInterpolator(sCollapseInterpolator);
mCollapseAlpha.setProperty(View.ALPHA);
mCollapseAlpha.setFloatValues(1f, 0f);
mExpandAlpha.setProperty(View.ALPHA);
mExpandAlpha.setFloatValues(0f, 1f);
switch (mExpandDirection) {
case EXPAND_UP:
case EXPAND_DOWN:
mCollapseDir.setProperty(View.TRANSLATION_Y);
mExpandDir.setProperty(View.TRANSLATION_Y);
break;
case EXPAND_LEFT:
case EXPAND_RIGHT:
mCollapseDir.setProperty(View.TRANSLATION_X);
mExpandDir.setProperty(View.TRANSLATION_X);
break;
}
}
代码示例来源:origin: shellljx/FuckingVolumeSlider
private void initAnimator() {
mPressAnimator = ObjectAnimator.ofFloat(this, DEGREE, 0, -45);
mPressAnimator.setDuration(1000);
mUpAnimator = new AnimatorSet();
mDegreeAnimator = new ObjectAnimator();
mDegreeAnimator.setTarget(this);
mDegreeAnimator.setProperty(DEGREE);
mBallAnimator = new ObjectAnimator();
mBallAnimator.setTarget(this);
mBallAnimator.setProperty(BALLLOCATION);
mUpAnimator.playTogether(mDegreeAnimator, mBallAnimator);
}
代码示例来源:origin: TakuSemba/CropMe
ScaleAnimatorImpl(View target, int maxScale) {
this.maxScale = maxScale;
this.animatorX = new ObjectAnimator();
animatorX.setProperty(SCALE_X);
animatorX.setTarget(target);
this.animatorY = new ObjectAnimator();
animatorY.setProperty(SCALE_Y);
animatorY.setTarget(target);
}
代码示例来源:origin: TakuSemba/CropMe
HorizontalMoveAnimatorImpl(View target, RectF restrictionRect, int maxScale) {
this.maxScale = maxScale;
this.restrictionRect = restrictionRect;
spring = new SpringAnimation(target,
new FloatPropertyCompat<View>("X") {
@Override
public float getValue(View view) {
return view.getX();
}
@Override
public void setValue(View view, float value) {
view.setX(value);
}
})
.setSpring(new SpringForce()
.setStiffness(STIFFNESS)
.setDampingRatio(DAMPING_RATIO)
);
fling = new FlingAnimation(target, DynamicAnimation.X).setFriction(FRICTION);
animator = new ObjectAnimator();
animator.setProperty(TRANSLATION_X);
animator.setTarget(target);
}
代码示例来源:origin: TakuSemba/CropMe
VerticalMoveAnimatorImpl(View target, RectF restrictionRect, int maxScale) {
this.maxScale = maxScale;
this.restrictionRect = restrictionRect;
spring = new SpringAnimation(target,
new FloatPropertyCompat<View>("Y") {
@Override
public float getValue(View view) {
return view.getY();
}
@Override
public void setValue(View view, float value) {
view.setY(value);
}
})
.setSpring(new SpringForce()
.setStiffness(STIFFNESS)
.setDampingRatio(DAMPING_RATIO)
);
fling = new FlingAnimation(target, DynamicAnimation.Y).setFriction(FRICTION);
animator = new ObjectAnimator();
animator.setProperty(TRANSLATION_Y);
animator.setTarget(target);
}
内容来源于网络,如有侵权,请联系作者删除!