我有一个继承了 View
的类,在它的画布上,我使用 onDraw()
方法来绘制所有需要的东西,就像这样:
protected void onDraw(Canvas canvas) {
synchronized (this) {
float h = mHeight;
float w = mWidth;
canvas.drawColor(Color.WHITE);
float roadLine= (85.0f/100.0f)*h;
canvas.drawBitmap(mTop, 0, roadLine-mTop.getHeight(), null);
//this is what I'd like to animate
canvas.drawBitmap(mSmoke);
}
}
我该如何在这里制作动画(补间动画)?