我想在 android 的画布上连续旋转圆圈。我正在使用画布绘制圆圈,并且我正在连续旋转圆圈。这是可能的,如果可能的话,如何使用代码或示例来帮助我非常感谢!
这是我在画布上绘制圆圈的代码:
import android.app.Activity;
import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Color;
import android.graphics.Paint;
import android.os.Bundle;
import android.view.View;
public class AnimationActivity extends Activity {
/** Called when the activity is first created. */
@Override
protected void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(new SampleView(this));
}
public class SampleView extends View
{
public SampleView(Context context)
{
super(context);
// TODO Auto-generated constructor stub
}
@Override
protected void onDraw(Canvas canvas)
{
Paint mPaint = new Paint();
mPaint.setStyle(Paint.Style.STROKE);
mPaint.setStrokeWidth(10);
mPaint.setColor(Color.RED);
canvas.drawCircle(75, 75, 75, mPaint);
}
}
}
提前致谢!