1.新建CircleAnimation.java类:
package com.example.viewpager_test;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.graphics.RectF;
import android.view.View;
import android.widget.RelativeLayout;
import android.os.Handler;
public class CircleAnimation extends RelativeLayout {
private Context mContext;
private ShadeView mShadeView;
private FrontView mFrontView;
private int mShadeColor = 0xffeeeeee;
private int mFrontColor = 0xff00ff00;
private float mShadeLine = 5;
private Paint.Style mShadeStyle = Paint.Style.STROKE;
private RectF mRect = new RectF(10,10,160,160);
private int mBeginAngle = 0;
private int mEndAngle = 270;
private int mDrawingAngle = 0;
private int mSeq = 0;
private int mRate = 2;
public CircleAnimation(Context context) {
super(context);
mContext = c
|