Search in sources :

Example 21 with RenderNodeAnimator

use of android.view.RenderNodeAnimator in project android_packages_apps_DUI by DirtyUnicorns.

the class OpaLayout method getDeltaAnimatorX.

private Animator getDeltaAnimatorX(View v, Interpolator interpolator, float deltaX, int duration) {
    RenderNodeAnimator anim = new RenderNodeAnimator(8, (int) (v.getX() + deltaX));
    anim.setTarget(v);
    anim.setInterpolator(interpolator);
    anim.setDuration(duration);
    return anim;
}
Also used : RenderNodeAnimator(android.view.RenderNodeAnimator)

Example 22 with RenderNodeAnimator

use of android.view.RenderNodeAnimator in project android_packages_apps_DUI by DirtyUnicorns.

the class OpaLayout method getScaleAnimatorX.

private Animator getScaleAnimatorX(View v, float factor, int duration, Interpolator interpolator) {
    RenderNodeAnimator anim = new RenderNodeAnimator(3, factor);
    anim.setTarget(v);
    anim.setInterpolator(interpolator);
    anim.setDuration(duration);
    return anim;
}
Also used : RenderNodeAnimator(android.view.RenderNodeAnimator)

Example 23 with RenderNodeAnimator

use of android.view.RenderNodeAnimator in project android_packages_apps_DUI by DirtyUnicorns.

the class OpaLayout method getScaleAnimatorY.

private Animator getScaleAnimatorY(View v, float factor, int duration, Interpolator interpolator) {
    RenderNodeAnimator anim = new RenderNodeAnimator(4, factor);
    anim.setTarget(v);
    anim.setInterpolator(interpolator);
    anim.setDuration(duration);
    return anim;
}
Also used : RenderNodeAnimator(android.view.RenderNodeAnimator)

Example 24 with RenderNodeAnimator

use of android.view.RenderNodeAnimator in project android_frameworks_base by AOSPA.

the class RippleForeground method createHardwareExit.

@Override
protected RenderNodeAnimatorSet createHardwareExit(Paint p) {
    final int radiusDuration;
    final int originDuration;
    final int opacityDuration;
    if (mIsBounded) {
        computeBoundedTargetValues();
        radiusDuration = BOUNDED_RADIUS_EXIT_DURATION;
        originDuration = BOUNDED_ORIGIN_EXIT_DURATION;
        opacityDuration = BOUNDED_OPACITY_EXIT_DURATION;
    } else {
        radiusDuration = getRadiusExitDuration();
        originDuration = radiusDuration;
        opacityDuration = getOpacityExitDuration();
    }
    final float startX = getCurrentX();
    final float startY = getCurrentY();
    final float startRadius = getCurrentRadius();
    p.setAlpha((int) (p.getAlpha() * mOpacity + 0.5f));
    mPropPaint = CanvasProperty.createPaint(p);
    mPropRadius = CanvasProperty.createFloat(startRadius);
    mPropX = CanvasProperty.createFloat(startX);
    mPropY = CanvasProperty.createFloat(startY);
    final RenderNodeAnimator radius = new RenderNodeAnimator(mPropRadius, mTargetRadius);
    radius.setDuration(radiusDuration);
    radius.setInterpolator(DECELERATE_INTERPOLATOR);
    final RenderNodeAnimator x = new RenderNodeAnimator(mPropX, mTargetX);
    x.setDuration(originDuration);
    x.setInterpolator(DECELERATE_INTERPOLATOR);
    final RenderNodeAnimator y = new RenderNodeAnimator(mPropY, mTargetY);
    y.setDuration(originDuration);
    y.setInterpolator(DECELERATE_INTERPOLATOR);
    final RenderNodeAnimator opacity = new RenderNodeAnimator(mPropPaint, RenderNodeAnimator.PAINT_ALPHA, 0);
    opacity.setDuration(opacityDuration);
    opacity.setInterpolator(LINEAR_INTERPOLATOR);
    opacity.addListener(mAnimationListener);
    final RenderNodeAnimatorSet set = new RenderNodeAnimatorSet();
    set.add(radius);
    set.add(opacity);
    set.add(x);
    set.add(y);
    return set;
}
Also used : RenderNodeAnimator(android.view.RenderNodeAnimator) Paint(android.graphics.Paint)

Example 25 with RenderNodeAnimator

use of android.view.RenderNodeAnimator in project android_frameworks_base by AOSPA.

the class KeyguardAffordanceView method startRtCircleFadeOut.

private void startRtCircleFadeOut(long duration) {
    RenderNodeAnimator animator = new RenderNodeAnimator(mHwCirclePaint, RenderNodeAnimator.PAINT_ALPHA, 0);
    animator.setDuration(duration);
    animator.setInterpolator(Interpolators.ALPHA_OUT);
    animator.setTarget(this);
    animator.start();
}
Also used : RenderNodeAnimator(android.view.RenderNodeAnimator)

Aggregations

RenderNodeAnimator (android.view.RenderNodeAnimator)67 Paint (android.graphics.Paint)15 Animator (android.animation.Animator)10 ObjectAnimator (android.animation.ObjectAnimator)10 ValueAnimator (android.animation.ValueAnimator)10 ViewPropertyAnimator (android.view.ViewPropertyAnimator)10 AnimatorListenerAdapter (android.animation.AnimatorListenerAdapter)5 View (android.view.View)4 AdapterView (android.widget.AdapterView)4 ListView (android.widget.ListView)4