I have this code:
protected void onDraw(Canvas canvas) {
// TODO Auto-generated method stub
super.onDraw(canvas);
canvas.drawColor(Color.WHITE);
canvas.drawBitmap(ball, (canvas.getWidth()/2), 0, null);
and it draw bitmap on screen but if i want to set new position it draw new one, how can i draw a new one and erase previous one. I’d like to set new position of bitmap on canvas.
Drawing color first will erease all then draw your Bitmap with new position.