use of android.animation.ObjectAnimator in project PaymentKit-Droid by brendanw.
the class CardIcon method alphaIn.
private void alphaIn(View v) {
ObjectAnimator alphaIn = ObjectAnimator.ofFloat(v, "alpha", 1.0f).setDuration(0);
alphaIn.start();
}
use of android.animation.ObjectAnimator in project PaymentKit-Droid by brendanw.
the class CardIcon method flipToFront.
private void flipToFront() {
ViewUtils.setHardwareLayer(mBackFace);
ObjectAnimator rotateBackFace = ObjectAnimator.ofFloat(mBackFace, "scaleX", 1.0f, 0.0f);
rotateBackFace.setDuration(HALF_FLIP_DURATION);
ViewUtils.setLayerTypeNone(mFrontFace);
final ObjectAnimator rotateFrontFace = ObjectAnimator.ofFloat(mFrontFace, "scaleX", 0.0f, 1.0f);
rotateFrontFace.setDuration(HALF_FLIP_DURATION);
rotateFrontFace.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator anim) {
ViewUtils.setLayerTypeNone(mBackFace);
}
});
rotateBackFace.addListener(new AnimatorListenerAdapter() {
@Override
public void onAnimationEnd(Animator anim) {
alphaOut(mBackFace);
ViewUtils.setLayerTypeNone(mBackFace);
alphaIn(mFrontFace);
rotateFrontFace.start();
}
});
rotateBackFace.start();
}
use of android.animation.ObjectAnimator in project slideuppane by briangriffey.
the class SlideUpPane method slideToTranslation.
private void slideToTranslation(float translation) {
ObjectAnimator animator = ObjectAnimator.ofFloat(this, "translationY", getTranslationY(), translation).setDuration(ANIMATION_TIME);
animator.setInterpolator(new OvershootInterpolator(1.2f));
if (mAnimatorListener != null)
animator.addListener(mAnimatorListener);
animator.start();
}
use of android.animation.ObjectAnimator in project RecyclerViewItemAnimators by gabrielemariotti.
the class ScaleInAnimatorAdapter method getAnimators.
@NonNull
@Override
public Animator[] getAnimators(@NonNull View view) {
ObjectAnimator scaleX = ObjectAnimator.ofFloat(view, SCALE_X, mScaleFrom, 1f);
ObjectAnimator scaleY = ObjectAnimator.ofFloat(view, SCALE_Y, mScaleFrom, 1f);
return new ObjectAnimator[] { scaleX, scaleY };
}
use of android.animation.ObjectAnimator in project ExpectAnim by florent37.
the class ExpectAnim method reset.
public void reset() {
final ObjectAnimator objectAnimator = ObjectAnimator.ofFloat(this, "percent", 1f, 0f);
objectAnimator.setDuration(duration);
if (interpolator != null) {
objectAnimator.setInterpolator(interpolator);
}
objectAnimator.start();
}
Aggregations