Search in sources :

Example 26 with RenderNodeAnimator

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

the class KeyguardAffordanceView method startRtAlphaFadeIn.

/**
     * Fades in the Circle on the RenderThread. It's used when finishing the circle when it had
     * alpha 0 in the beginning.
     */
private void startRtAlphaFadeIn() {
    if (mCircleRadius == 0 && mPreviewView == null) {
        Paint modifiedPaint = new Paint(mCirclePaint);
        modifiedPaint.setColor(mCircleColor);
        modifiedPaint.setAlpha(0);
        mHwCirclePaint = CanvasProperty.createPaint(modifiedPaint);
        RenderNodeAnimator animator = new RenderNodeAnimator(mHwCirclePaint, RenderNodeAnimator.PAINT_ALPHA, 255);
        animator.setTarget(this);
        animator.setInterpolator(Interpolators.ALPHA_IN);
        animator.setDuration(250);
        animator.start();
    }
}
Also used : RenderNodeAnimator(android.view.RenderNodeAnimator) Paint(android.graphics.Paint)

Example 27 with RenderNodeAnimator

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

the class KeyguardAffordanceView method getRtAnimatorToRadius.

private Animator getRtAnimatorToRadius(float circleRadius) {
    RenderNodeAnimator animator = new RenderNodeAnimator(mHwCircleRadius, circleRadius);
    animator.setTarget(this);
    return animator;
}
Also used : RenderNodeAnimator(android.view.RenderNodeAnimator)

Example 28 with RenderNodeAnimator

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

the class LockPatternView method startRtFloatAnimation.

private void startRtFloatAnimation(CanvasProperty<Float> property, float endValue, long delay, long duration, Interpolator interpolator) {
    RenderNodeAnimator animator = new RenderNodeAnimator(property, endValue);
    animator.setDuration(duration);
    animator.setStartDelay(delay);
    animator.setInterpolator(interpolator);
    animator.setTarget(this);
    animator.start();
}
Also used : RenderNodeAnimator(android.view.RenderNodeAnimator)

Example 29 with RenderNodeAnimator

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

the class LockPatternView method startRtAlphaAnimation.

private void startRtAlphaAnimation(CellState cellState, float endAlpha, long delay, long duration, Interpolator interpolator, Animator.AnimatorListener listener) {
    RenderNodeAnimator animator = new RenderNodeAnimator(cellState.hwPaint, RenderNodeAnimator.PAINT_ALPHA, (int) (endAlpha * 255));
    animator.setDuration(duration);
    animator.setStartDelay(delay);
    animator.setInterpolator(interpolator);
    animator.setTarget(this);
    animator.addListener(listener);
    animator.start();
}
Also used : RenderNodeAnimator(android.view.RenderNodeAnimator)

Example 30 with RenderNodeAnimator

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

the class KeyguardAffordanceView method startRtAlphaFadeIn.

/**
     * Fades in the Circle on the RenderThread. It's used when finishing the circle when it had
     * alpha 0 in the beginning.
     */
private void startRtAlphaFadeIn() {
    if (mCircleRadius == 0 && mPreviewView == null) {
        Paint modifiedPaint = new Paint(mCirclePaint);
        modifiedPaint.setColor(mCircleColor);
        modifiedPaint.setAlpha(0);
        mHwCirclePaint = CanvasProperty.createPaint(modifiedPaint);
        RenderNodeAnimator animator = new RenderNodeAnimator(mHwCirclePaint, RenderNodeAnimator.PAINT_ALPHA, 255);
        animator.setTarget(this);
        animator.setInterpolator(Interpolators.ALPHA_IN);
        animator.setDuration(250);
        animator.start();
    }
}
Also used : RenderNodeAnimator(android.view.RenderNodeAnimator) Paint(android.graphics.Paint)

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