第二个 两个小球旋转的动画,形成视觉差的效果
动画组成:
主要是左右两个小球的位移和体积变化动画.
1.要利用ObjectAnimator的target,target可以是控件,也可以是类,只要包装类存在需要你动画改变的方法.
package com.example.administrator.animationworkdemo.views;
import android.animation.AnimatorSet;
import android.animation.ObjectAnimator;
import android.animation.ValueAnimator;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.util.AttributeSet;
import android.view.View;
import android.view.animation.AccelerateDecelerateInterpolator;
import android.view.animation.BounceInterpolator;
import android.view.animation.DecelerateInterpolator;
/**
* Created by SuperD on 2017/2/17.
* 小球转动的View
*/
public class CircleRotateLoadingView extends View implements View.OnClickListener {
private static final int MAX_BALL_RADIUS = 75;
private static final int MID_BALL_RADIUS = 50;
private static final int MIN_BALL_RADIUS = 25;