how to erase an image drawn by canvas?
@Override
protected void onDraw(Canvas canvas) 开发者_高级运维{
// TODO Auto-generated method stub
Log.d("dd","draw");
mBitmap=BitmapFactory.decodeResource(this.getResources(),R.drawable.image1);
canvas.drawBitmap(mBitmap, srcRect,dstRect,null);
mBitmaps=BitmapFactory.decodeResource(this.getResources(),R.drawable.paintball);
canvas.drawBitmap(mBitmaps, 180,200,null);
}
Canvas.drawColor(Color.BLACK)
or to your bg color.
精彩评论