Example usage for android.animation ValueAnimator setTarget

List of usage examples for android.animation ValueAnimator setTarget

Introduction

In this page you can find the example usage for android.animation ValueAnimator setTarget.

Prototype

public void setTarget(@Nullable Object target) 

Source Link

Document

Sets the target object whose property will be animated by this animation.

Usage

From source file:com.angelatech.yeyelive.view.PeriscopeLayout.java

private ValueAnimator getBezierValueAnimator(View target) {
    //??- - //from ww  w  .j  a va2s .c  o m
    BezierEvaluator evaluator = new BezierEvaluator(getPointF(2), getPointF(1));
    // ?   
    ValueAnimator animator = ValueAnimator.ofObject(evaluator,
            new PointF((mWidth - dWidth) / 2, mHeight - dHeight), new PointF(random.nextInt(getWidth()), 0));
    animator.addUpdateListener(new BezierListenr(target));
    animator.setTarget(target);
    animator.setDuration(1500);
    return animator;
}